Skip to content

Conversation

@gkevinzheng
Copy link
Contributor

Godoc preview:
image

@gkevinzheng gkevinzheng requested review from a team as code owners July 11, 2024 17:31
@gkevinzheng gkevinzheng requested a review from cindy-peng July 11, 2024 17:31
@product-auto-label product-auto-label bot added the api: logging Issues related to the Cloud Logging API. label Jul 11, 2024
logging/doc.go Outdated
or [X-Cloud-Trace-Context] headers, if those headers exist.
Note that if Trace, SpanID, or TraceSampled are explicitly provided within an Entry object, those values will take precedence over values automatically
extracted from the aforementioned process.

Choose a reason for hiding this comment

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

I think you could just say "over automatically extracted values"

logging/doc.go Outdated
2. Trace, SpanID, and TraceSampled fields will be populated from information from the http.Request's [W3C Traceparent]
or [X-Cloud-Trace-Context] headers, if those headers exist.
Note that if Trace, SpanID, or TraceSampled are explicitly provided within an Entry object, those values will take precedence over values automatically

Choose a reason for hiding this comment

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

I'd say "object, then those values take precedence" (a little more direct/less wordy than "will take", and then meaning is the same)

logging/doc.go Outdated
When Entry with an [http.Request] is logged, its Trace, SpanID, and TraceSampled fields may be automatically populated as follows:
1. If you are instrumenting your application with [OpenTelemetry] and your http.Request's Context contains an [OpenTelemetry span context],
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi Kevin, do we need to specify this "and your http.Request's Context contains an [OpenTelemetry span context]"? It is automatically added when customer's application is instrumented with OpenTelemetry right?

logging/doc.go Outdated
parent entry will not inherit the severity of its children; you must update the
parent severity yourself.
# Automatic Metadata Extraction
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to call this "Automatic Metadata Extraction" or "Automatic Trace/Span Id Extraction" as in googleapis/python-logging#915?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it would be good to change it to be more specific in this instance.

logging/doc.go Outdated
When Entry with an [http.Request] is logged, its Trace, SpanID, and TraceSampled fields may be automatically populated as follows:
1. If you are instrumenting your application with [OpenTelemetry],

Choose a reason for hiding this comment

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

It might be helpful to be more specific, and reference go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp, since it would be complicated for users to properly to use this without the instrumentation library itself.

@gkevinzheng gkevinzheng merged commit 8cf89a3 into googleapis:main Jul 15, 2024
@gkevinzheng gkevinzheng deleted the otel-docs branch July 15, 2024 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: logging Issues related to the Cloud Logging API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants