Skip to content

feat: opentelemetry integration#346

Closed
PacoDu wants to merge 8 commits intomercurius-js:masterfrom
PacoDu:opentelemetry-integration
Closed

feat: opentelemetry integration#346
PacoDu wants to merge 8 commits intomercurius-js:masterfrom
PacoDu:opentelemetry-integration

Conversation

@PacoDu
Copy link
Copy Markdown
Contributor

@PacoDu PacoDu commented Nov 11, 2020

Mercurius works with existing tools like @autotelic/fastify-opentelemetry and @opentelemetry/instrumentation-graphql. But it's missing some mercurius specific spans and attributes that we can add with the opentelemetry API.

As a reference, here is an example of a mercurius trace with a gateway and a service and without any additional opentelemetry integration:
image

And here is an example with a simple mercurius - graphql span added to the main fastifyGraphql function and a cached attribute (see PR changes):
image

We need to define what we want to expose in opentelemetry traces (spans and attributes). And maybe add a telemetry option to mercurius so user can enable/disable telemetry ?

@PacoDu
Copy link
Copy Markdown
Contributor Author

PacoDu commented Nov 11, 2020

Depends on #341

@mcollina
Copy link
Copy Markdown
Collaborator

mcollina commented Dec 5, 2020

@Pablodu any updates on this one?

@PacoDu
Copy link
Copy Markdown
Contributor Author

PacoDu commented Dec 6, 2020

This is a demonstration of a span usage inside the mercurius library, I don't have time right now to push it further unfortunately.
If you want I can cleanup this PR and just add the tracer and the base mercurius span.

@PacoDu
Copy link
Copy Markdown
Contributor Author

PacoDu commented Dec 14, 2020

superseded by #363

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants