-
Notifications
You must be signed in to change notification settings - Fork 3.9k
gcp-observability: add custom tags for all 3 - metrics, logging, traces and remove old env-vars impl #9402
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
Conversation
…es and remove old env-vars impl
@@ -69,7 +69,7 @@ public static synchronized GcpObservability grpcInit() throws IOException { | |||
GlobalLoggingTags globalLoggingTags = new GlobalLoggingTags(); | |||
ObservabilityConfigImpl observabilityConfig = ObservabilityConfigImpl.getInstance(); | |||
Sink sink = new GcpLogSink(observabilityConfig.getDestinationProjectId(), | |||
globalLoggingTags.getLocationTags(), globalLoggingTags.getCustomTags(), | |||
globalLoggingTags.getLocationTags(), observabilityConfig.getCustomTags(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This only adds custom tags for logging. Don't we need to add same set of custom tags for metrics and traces as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, but that will be a separate PR (as per the task list we have created)
gcp-observability/src/main/java/io/grpc/gcp/observability/GlobalLoggingTags.java
Outdated
Show resolved
Hide resolved
gcp-observability/src/main/java/io/grpc/gcp/observability/GlobalLoggingTags.java
Outdated
Show resolved
Hide resolved
@@ -35,20 +33,16 @@ | |||
import java.util.logging.Level; | |||
import java.util.logging.Logger; | |||
|
|||
/** A container of all global custom tags used for logging (for now). */ | |||
/** A container of all global location tags used for observability. */ | |||
final class GlobalLoggingTags { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the class specifically contains "location" tags, should the class be called GlobalLocationTags? Or more types of tags to be added?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Renamed everywhere.
friendly ping |
We replace the env-vars based custom tags with JSON config based custom tags as per the latest o11y config design
CC @DNVindhya