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

Expose trace IDs in cloud event functions #40

Closed
roffjulie opened this issue Aug 13, 2020 · 2 comments
Closed

Expose trace IDs in cloud event functions #40

roffjulie opened this issue Aug 13, 2020 · 2 comments

Comments

@roffjulie
Copy link

roffjulie commented Aug 13, 2020

The X-Cloud-Trace-Context header is included in requests, but as we don't expose headers to the event-style functions it is inaccessible. This value is the only means of grouping StackDriver logs by request, and so we should expose it to the user function code.

The trace ID should be encoded as an extension on the event, leveraging the traceparent extension field as described in https://github.com/cloudevents/spec/blob/master/extensions/distributed-tracing.md.

@roffjulie roffjulie changed the title Expose trace IDs in background and cloud event functions Expose trace IDs in cloud event functions Aug 13, 2020
@grayside
Copy link

grayside commented Sep 8, 2020

General discussion about exposing HTTP headers in GoogleCloudPlatform/functions-framework#34

@josephlewis42
Copy link
Contributor

Closing this in favor of the GoogleCloudPlatform/functions-framework#34 issue which we'll use to standardize behavior across languages.

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

No branches or pull requests

3 participants