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

feat: Integrate Tailcall with OpenTelemetry #134

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

kevinmichaelchen
Copy link
Owner

@kevinmichaelchen kevinmichaelchen commented Mar 9, 2024

# step 1 - start up servers
make

# step 2 - start tailcall
task run:tailcall

# step 3 - start docs
(cd docs && bun install && bun dev)

Run this GraphQL mutation in the GraphQL Playground.

Tailcall will export telemetry via gRPC to the local OTel Collector's port 4317. A trace for tailcall will appear in Jaeger.

@telemetry(
export: {
otlp: {
url: "http://localhost:4318"
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the otel collector should be able to receive telemetry via http on port 4318

https://github.com/kevinmichaelchen/temporal-saga-grpc/blob/main/docker-compose.yml#L39

@kevinmichaelchen
Copy link
Owner Author

kevinmichaelchen commented Mar 9, 2024

Trace context propagation does not appear to be working. I see the Tailcall trace with only 3 spans, and it's missing all the other spans.

Tailcall spans

tailcall-spans

Other spans

other-spans

I'm using Temporal's default trace propagator, which is really just the default OTel propagator that uses W3C:

import "go.temporal.io/sdk/contrib/opentelemetry"

// Set the same Trace Propagator that Temporal uses by default
otel.SetTextMapPropagator(opentelemetry.DefaultTextMapPropagator)

@kevinmichaelchen
Copy link
Owner Author

kevinmichaelchen commented Mar 9, 2024

logging http headers

INFO received request headers="map[Accept:[*/*] Connect-Protocol-Version:[1] Content-Type:[application/json] Host:[localhost:8081] User-Agent:[Tailcall/1.0]]"

possibilities

  • tailcall isn't sending trace headers
    • tailcall uses tokio under the hood. tried running tailcall w/ stdout telemetry and tokio is clearly generating spans with traceId and spanId. but no such headers show up. is tokio not sending them?
  • headers are getting lost during vanguard transcoding
    • can't find any logic that would cause headers to get filtered out

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.

None yet

1 participant