Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(feature) OpenTelemetry exporter #1375

Open
4 tasks
thomaspoignant opened this issue Dec 13, 2023 · 4 comments
Open
4 tasks

(feature) OpenTelemetry exporter #1375

thomaspoignant opened this issue Dec 13, 2023 · 4 comments
Assignees
Labels
📍 Assigned enhancement New feature or request good first issue Good for newcomers p2 Medium priority 📌 Pinned

Comments

@thomaspoignant
Copy link
Owner

Requirement

As of Today, we have a bunch of data exporter to export at different location, but the format is owned by GO Feature Flag.
To integrate better with other tools it will be great to have a OpenTelemetry data exporter that will add a span for each evaluation.

  • Develop a new exporter in the exporter folder.
  • Create a span for each evaluation.
  • Let user configure this exporter in the relay proxy.
  • Update the documentation with this exporter.
@thomaspoignant thomaspoignant added enhancement New feature or request p2 Medium priority good first issue Good for newcomers labels Dec 13, 2023
@bearrito
Copy link
Contributor

I haven't contributed before, I can grab this if thats okay.

@thomaspoignant
Copy link
Owner Author

Hey @bearrito feel free to take it.

@bearrito
Copy link
Contributor

bearrito commented Apr 15, 2024

Just so I can confirm scope

  1. I see that the other exporters all take a featureEvents []exporter.FeatureEvent. This needs to be converted into a trace. I need to learn more about Features and Evaluations. But would each FeatureEvent correspond to a span within the trace?
  2. OpenTelemetry itself supports exporters. I assume you want support for all these? Is there one to prioritize?
  3. Do I need to worry about context propagation? (I don't think so)
  4. Do you want resources (metadata) included. ( I think so)

Edit:
I'm not familiar with the relay proxy so I'll deal with that when I encounter it, I'll get to what I think is an 80% solution with unit-tests first.

@thomaspoignant
Copy link
Owner Author

Hello @bearrito let me try to answer your questions.

  1. I see that the other exporters all take a featureEvents []exporter.FeatureEvent. This needs to be converted into a trace. I need to learn more about Features and Evaluations. But would each FeatureEvent correspond to a span within the trace?

Yes, you can emit 1 span for each featureEvent, but since this can be a synchronous exporter I recommend to set the IsBulk function at false (like in the example below), this will ensure that you will never have more than 1 event in the array for each call.

func (f *Exporter) IsBulk() bool {
return false
}

  1. OpenTelemetry itself supports exporters. I assume you want support for all these? Is there one to prioritize?

Since this is meant to be used by anyone, I would say that we should export to OTLP so the users can decide on their side which one to use.

  1. Do I need to worry about context propagation? (I don't think so)

No, we can start without that for now.

  1. Do you want resources (metadata) included. ( I think so)

Yes, ideally we should have them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📍 Assigned enhancement New feature or request good first issue Good for newcomers p2 Medium priority 📌 Pinned
Projects
None yet
Development

No branches or pull requests

2 participants