-
Notifications
You must be signed in to change notification settings - Fork 1.9k
TRACING-5814 | RHOSDT 3.9 Document google managed prometheus #104286
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
Changes from 4 commits
35a1024
4f37f23
a08a279
da06f79
c20634e
5c73d11
725d3af
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| // Module included in the following assemblies: | ||
| // | ||
| // * observability/otel/otel-collector/otel-collector-extensions.adoc | ||
|
|
||
| :_mod-docs-content-type: REFERENCE | ||
| [id="otel-extensions-googleauth-extension_{context}"] | ||
| = Google Client Authentication Extension | ||
|
|
||
| [role="_abstract"] | ||
|
|
||
| The Google Client Authentication extension provides Google OAuth2 Client Credentials and Metadata for gRPC and http based exporters. | ||
|
|
||
| .OpenTelemetry Collector custom resource with the configured Google Client Auth Extension | ||
| [source,yaml] | ||
| ---- | ||
| # ... | ||
| config: | ||
| extensions: | ||
| googleclientauth: | ||
| project: "my-project" # <1> | ||
|
|
||
| exporters: | ||
| otlphttp: | ||
| encoding: json | ||
| endpoint: https://telemetry.googleapis.com | ||
| auth: | ||
| authenticator: googleclientauth | ||
|
|
||
| service: | ||
| extensions: [googleclientauth] | ||
| pipelines: | ||
| traces: | ||
| receivers: [otlp] | ||
| exporters: [debug] | ||
| # ... | ||
| ---- | ||
|
|
||
| <1> The Google Cloud Project telemetry is sent to if the `gcp.project.id` resource attribute is not set. If unspecified, this is determined using application default credentials. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| // Module included in the following assemblies: | ||
| // | ||
| // * observability/otel/otel-forwarding-telemetry-data.adoc | ||
|
|
||
| :_mod-docs-content-type: CONCEPT | ||
| [id="otel-forwarding-data-to-google-managed-prometheus_{context}"] | ||
| = Forwarding telemetry data to Google Managed Prometheus | ||
|
|
||
| [role="_abstract"] | ||
| To forward metrics to the Google Managed Prometheus, use the OpenTelemetry Collector with the OTLP exporter, metricstarttime processor and googleclientauth extension. | ||
|
|
||
| .OpenTelemetry Collector custom resource with a configured File Storage Extension that persists an OTLP sending queue | ||
| [source,yaml] | ||
| ---- | ||
| # ... | ||
| mode: sidecar | ||
| config: | ||
| extensions: | ||
| googleclientauth: {} | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @IshwarKanse the enxtension has a project parameter
what do they mean by this? In OCP context, can it be only specified in
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Application Default Credentials (ADC) is Google's credential discovery mechanism that searches for credentials in this order:
In the OpenShift/Kubernetes context, GOOGLE_APPLICATION_CREDENTIALS is the standard approach, even when running on Google Cloud, because:
The GOOGLE_APPLICATION_CREDENTIALS env var should point to one of these credential types:
About the project parameter When we set project in the extension config, it's actually optional because:
For the documentation, I'd suggest making the project parameter optional and explaining that users can omit it if they're already setting the resource attribute or if they want ADC to auto-detect it from the credentials. |
||
|
|
||
| exporters: | ||
| otlphttp: | ||
| encoding: json | ||
| endpoint: https://telemetry.googleapis.com | ||
| auth: | ||
| authenticator: googleclientauth | ||
|
|
||
| processors: | ||
| metricstarttime: | ||
| strategy: subtract_initial_point # <1> | ||
|
|
||
| resource/gcp_project_id: | ||
| attributes: | ||
| - action: insert | ||
| value: project_id # <2> | ||
| key: gcp.project_id | ||
|
|
||
| k8sattributes: {} | ||
|
|
||
| transform/collision: | ||
| metric_statements: | ||
| - context: datapoint | ||
| statements: | ||
| - set(attributes["exported_location"], attributes["location"]) | ||
| - delete_key(attributes, "location") | ||
| - set(attributes["exported_cluster"], attributes["cluster"]) | ||
| - delete_key(attributes, "cluster") | ||
| - set(attributes["exported_namespace"], attributes["namespace"]) | ||
| - delete_key(attributes, "namespace") | ||
| - set(attributes["exported_job"], attributes["job"]) | ||
| - delete_key(attributes, "job") | ||
| - set(attributes["exported_instance"], attributes["instance"]) | ||
| - delete_key(attributes, "instance") | ||
| - set(attributes["exported_project_id"], attributes["project_id"]) | ||
| - delete_key(attributes, "project_id") | ||
|
|
||
| service: | ||
| extensions: [googleclientauth] | ||
| pipelines: | ||
| metrics: | ||
| processors: [k8sattributes, resource/gcp_project_id, transform/collision, metricstarttime] | ||
| exporters: [otlphttp] | ||
| # ... | ||
| ---- | ||
| <1> The `subtract_initial_point` strategy is stateful, requiring the Collector to run as a sidecar to maintain per-pod state. Alternative strategies available; choose the one that best fits your use case. | ||
|
max-cx marked this conversation as resolved.
Outdated
|
||
| <2> Replace with your GCP project ID. | ||
|
max-cx marked this conversation as resolved.
|
Uh oh!
There was an error while loading. Please reload this page.