-
Notifications
You must be signed in to change notification settings - Fork 1.8k
TRACING-5677 | RHOSDT 3.8, Google Cloud exporter and AWS IAM/ #99810
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
Draft
pavolloffay
wants to merge
4
commits into
openshift:main
Choose a base branch
from
pavolloffay:wif-aws-googlecouldexporter
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
a9a4ffc
TRACING-5677: RHOSDT 3.8, OTEL googlecloud exporter
pavolloffay 4313694
TRACING-5677: RHOSDT 3.8, OTEL googlecloud exporter
pavolloffay 58a4dd4
TRACING-5677: RHOSDT 3.8, OTEL googlecloud exporter
pavolloffay 72d557f
TRACING-5677: RHOSDT 3.8, OTEL googlecloud exporter
pavolloffay File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| //Module included in the following assemblies: | ||
| // | ||
| // * observability/otel/otel-forwarding-data.adoc | ||
|
|
||
| :_mod-docs-content-type: PROCEDURE | ||
| [id="otel-forwarding-data-to-googlecloud_{context}"] | ||
| = Forwarding telemetry data to AWS | ||
|
|
||
| You can deploy the OpenTelemetry Collector to forward metrics, logs and traces to the AWS CloudWatch and X-Ray. | ||
|
|
||
| TODO Add link to the AWF CloudWatch, EMF and X-Ray exporter from the collector configuration page. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| //Module included in the following assemblies: | ||
| // | ||
| // * observability/otel/otel-forwarding-data.adoc | ||
|
|
||
| :_mod-docs-content-type: PROCEDURE | ||
| [id="otel-forwarding-data-to-googlecloud_{context}"] | ||
| = Forwarding telemetry data to Google Cloud | ||
|
|
||
| You can deploy the OpenTelemetry Collector to forward metrics, logs and traces to the Google Cloud by using the Google Cloud exporter. | ||
|
|
||
| TODO Add link to the googlecloud exporter from the collector configuration page. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -311,13 +311,15 @@ include::snippets/technology-preview.adoc[] | |
| region: <aws_region_of_log_stream> # <3> | ||
| endpoint: <protocol><service_endpoint_of_amazon_cloudwatch_logs> # <4> | ||
| log_retention: <supported_value_in_days> # <5> | ||
| role_arn: "<iam_role>" # <6> | ||
| # ... | ||
| ---- | ||
| <1> Required. If the log group does not exist yet, it is automatically created. | ||
| <2> Required. If the log stream does not exist yet, it is automatically created. | ||
| <3> Optional. If the AWS region is not already set in the default credential chain, you must specify it. | ||
| <4> Optional. You can override the default Amazon CloudWatch Logs service endpoint to which the requests are forwarded. You must include the protocol, such as `https://`, as part of the endpoint value. For the list of service endpoints by region, see link:https://docs.aws.amazon.com/general/latest/gr/cwl_region.html[Amazon CloudWatch Logs endpoints and quotas] (AWS General Reference). | ||
| <5> Optional. With this parameter, you can set the log retention policy for new Amazon CloudWatch log groups. If this parameter is omitted or set to `0`, the logs never expire by default. Supported values for retention in days are `1`, `3`, `5`, `7`, `14`, `30`, `60`, `90`, `120`, `150`, `180`, `365`, `400`, `545`, `731`, `1827`, `2192`, `2557`, `2922`, `3288`, or `3653`. | ||
| <6> Optional. The AWS Identity and Access Management (IAM) role for uploading the X-Ray segments to a different account. | ||
|
|
||
| [role="_additional-resources"] | ||
| .Additional resources | ||
|
|
@@ -357,6 +359,7 @@ include::snippets/technology-preview.adoc[] | |
| endpoint: <protocol><endpoint> # <5> | ||
| log_retention: <supported_value_in_days> # <6> | ||
| namespace: <custom_namespace> # <7> | ||
| role_arn: "<iam_role>" # <8> | ||
| # ... | ||
| ---- | ||
| <1> Customized log group name. | ||
|
|
@@ -366,6 +369,7 @@ include::snippets/technology-preview.adoc[] | |
| <5> Optional. You can override the default Amazon CloudWatch Logs service endpoint to which the requests are forwarded. You must include the protocol, such as `https://`, as part of the endpoint value. For the list of service endpoints by region, see link:https://docs.aws.amazon.com/general/latest/gr/cwl_region.html[Amazon CloudWatch Logs endpoints and quotas] (AWS General Reference). | ||
| <6> Optional. With this parameter, you can set the log retention policy for new Amazon CloudWatch log groups. If this parameter is omitted or set to `0`, the logs never expire by default. Supported values for retention in days are `1`, `3`, `5`, `7`, `14`, `30`, `60`, `90`, `120`, `150`, `180`, `365`, `400`, `545`, `731`, `1827`, `2192`, `2557`, `2922`, `3288`, or `3653`. | ||
| <7> Optional. A custom namespace for the Amazon CloudWatch metrics. | ||
| <8> Optional. The AWS Identity and Access Management (IAM) role for uploading the X-Ray segments to a different account. | ||
|
|
||
| [discrete] | ||
| [id="log-group-name_{context}"] | ||
|
|
@@ -445,6 +449,50 @@ include::snippets/technology-preview.adoc[] | |
| // * link:https://docs.aws.amazon.com/sdk-for-go/v2/developer-guide/configure-auth.html[Configure Authentication] (AWS SDK for Go v2 Developer Guide) | ||
| * link:https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html[IAM roles] (AWS Identity and Access Management User Guide) | ||
|
|
||
| [id="googlecloud-exporter_{context}"] | ||
| == Google Cloud Exporter | ||
|
|
||
| The Google Cloud Exporter can be used converts the OpenTelemetry spans, metrics and logs to the Google Cloud Trace, Monitoring, and Logging formats and then sends them directly to the Google Cloud operations suite (formerly Stackdriver). | ||
|
|
||
| The Goolge Cloud Exporter can be used to send metrics to Google Cloud Monitoring (formerly Stackdriver), traces to Google Cloud Trace, and logs to Google Cloud Logging. | ||
|
|
||
| :FeatureName: The Google Cloud Exporter | ||
| include::snippets/technology-preview.adoc[] | ||
|
|
||
| .OpenTelemetry Collector custom resource with the enabled Google Cloud Exporter | ||
| [source,yaml] | ||
| ---- | ||
| # ... | ||
| env: | ||
| - name: GOOGLE_APPLICATION_CREDENTIALS | ||
| value: /var/secrets/google/key.json # <1> | ||
| volumeMounts: | ||
| - name: google-application-credentials | ||
| mountPath: /var/secrets/google | ||
| readOnly: true | ||
| volumes: | ||
| - name: google-application-credentials | ||
| secret: | ||
| secretName: google-application-credentials | ||
| config: | ||
| exporters: | ||
| googlecloud: | ||
| project: # <3> | ||
| # ... | ||
| ---- | ||
| <1> The `GOOGLE_APPLICATION_CREDENTIALS` environment variable which points to the authentication `key.json` file. The `key.json` file is mounted as a secret volume to the collector. | ||
| <2> Optional project identifier. If not specified, the project is determined from the credentials. | ||
|
|
||
| [role="_additional-resources"] | ||
| .Additional resources | ||
| * link:https://cloud.google.com/monitoring?hl=en[Google Cloud Monitoring] | ||
| * link:https://cloud.google.com/logging?hl=en[Google Cloud Logging] | ||
| * link:https://cloud.google.com/trace?hl=en[Google Cloud Trace] | ||
| * link:https://cloud.google.com/iam/docs/workload-identity-federation-with-kubernetes#deploy[Google Workflow Identity Federation docs] | ||
|
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 are you using these commands to configure WIF? Is it possible to use just the k8s SA to push data to the google cloud? e.g. without using the |
||
|
|
||
| === Multi-Project exporting | ||
| By default, the exporter sends telemetry to the project specified by project in the configuration. This can be overridden on a per-metrics basis using the `gcp.project.id` resource attribute. For example, if a metric has a label project, you could use the groupbyattrs processor to promote it to a resource label, and the resource processor to rename the attribute from project to `gcp.project.id`. | ||
|
|
||
| [id="file-exporter_{context}"] | ||
| == File Exporter | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@IshwarKanse we should update our e2e tests https://github.com/openshift/distributed-tracing-qe/tree/main/tests/e2e-otel to use the
role_arnThere 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.
Added googlecloud exporter test which used WIF openshift/distributed-tracing-qe#117 We have aws tests using role ARN as well.