docs: add observability guide for OpenTelemetry tracing and logging - #14462
jinseopkim0 wants to merge 9 commits into
Conversation
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request introduces a comprehensive observability guide (OBSERVABILITY.md) explaining how to configure OpenTelemetry tracing and SLF4J logging in Google Cloud Java client libraries, and updates the README.md to link to it. Feedback on the guide points out that the OpenTelemetry initialization code snippet contains an unused import and fails to handle a checked IOException thrown by TraceExporter.createWithDefaultCredentials(), which would cause compilation errors. A code suggestion is provided to wrap the snippet in a method handling the exception and clean up the imports.
There was a problem hiding this comment.
Code Review
This pull request introduces a new Observability guide (OBSERVABILITY.md) that explains how to configure OpenTelemetry tracing and SLF4J logging in Google Cloud Java client libraries, and updates the main README.md to link to it. The review feedback identifies two issues in the guide's Java code examples: an unused import of GlobalOpenTelemetry and an incorrect method call on TraceExporter, which should be changed to createWithDefaultConfiguration() to ensure the example is correct and functional.
…n IOException method
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request introduces a new observability guide (OBSERVABILITY.md) explaining how to configure OpenTelemetry tracing and SLF4J logging in Google Cloud Java client libraries, and updates the README.md to link to it. A review comment points out that the guide incorrectly uses setApiTracerFactory instead of setTracerFactory in the code example, which would result in a compilation error.
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request introduces a new Observability Guide (OBSERVABILITY.md) that explains how to configure OpenTelemetry tracing and SLF4J logging in Google Cloud Java client libraries, and updates the main README.md to link to this guide. The review feedback suggests returning OpenTelemetrySdk instead of OpenTelemetry in the initialization example to allow proper closing of the SDK and prevent span loss upon application exit.
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request introduces a new OBSERVABILITY.md guide detailing how to configure tracing and logging using OpenTelemetry and SLF4J in Google Cloud Java client libraries, along with a reference link in README.md. Feedback on the new guide highlights two issues in the code snippets: an unused import (io.opentelemetry.api.OpenTelemetry) in the initialization example, and a compilation error where setApiTracerFactory should be used instead of setTracerFactory when configuring the tracer factory.
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request introduces a new observability guide (OBSERVABILITY.md) that explains how to configure OpenTelemetry tracing and SLF4J logging in Google Cloud Java client libraries, and updates the main README.md to link to it. Feedback on the guide suggests correcting the example code to use the standard MyServiceSettings class and the more idiomatic getStubSettingsBuilder() method for configuring the tracer factory.
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request adds a new observability guide (OBSERVABILITY.md) explaining how to configure OpenTelemetry tracing and SLF4J structured logging in Google Cloud Java client libraries, and links to it from the main README.md. Feedback on the documentation points out that trace-log correlation requires explicit MDC propagation (e.g., via the OpenTelemetry Javaagent or an MDC provider dependency) rather than just having an active span, and suggests updating the guide to clarify this requirement.
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request introduces a new observability guide (OBSERVABILITY.md) that explains how to configure OpenTelemetry tracing and SLF4J logging in Google Cloud Java client libraries, and links to it from the main README.md. Feedback on the guide suggests correcting the artifact ID for the Logback MDC dependency from 'opentelemetry-logback-mdc-provider' to 'opentelemetry-logback-mdc-1.0' to prevent dependency resolution errors.
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request introduces a new Observability Guide (OBSERVABILITY.md) that explains how to enable and configure distributed tracing and structured logging using OpenTelemetry and SLF4J in Google Cloud Java client libraries, and links to this guide from the main README.md. The feedback suggests providing the full Maven dependency coordinates and version for the opentelemetry-logback-mdc-1.0 artifact, as it is not managed by the core OpenTelemetry BOM.
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request introduces a new observability guide (OBSERVABILITY.md) explaining how to configure OpenTelemetry tracing and SLF4J logging in Google Cloud Java client libraries, and links to it from the README.md. A correction is suggested in the guide's Java code snippet to use stubSettingsBuilder() instead of getStubSettingsBuilder() to avoid a compilation error.
This PR adds a developer documentation guide for OpenTelemetry tracing and structured logging correlation in Google Cloud Java client libraries.
Source-Link: b/564461795