Skip to content
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

feat(opentelemetry): ✨ support for secured OTLP endpoint and headers #15573

Merged
merged 14 commits into from
Nov 27, 2023

Conversation

prashant-shahi
Copy link
Contributor

@prashant-shahi prashant-shahi commented Sep 19, 2023

This PR adds support for sending Argo CD traces to secured OTLP endpoint along with the custom headers.
These can be configured with the help of these flags: --otlp-header and --otlp-insecure.

Fixes #12310 (proposal by @mtsvyatkovski)
Fixes #13927 (proposal by @bencompton)

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Toolchain Guide
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • Optional. My organization is added to USERS.md.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.

Signed-off-by: Prashant Shahi [email protected]

@prashant-shahi prashant-shahi requested a review from a team as a code owner September 19, 2023 16:30
@prashant-shahi prashant-shahi requested a review from a team as a code owner September 19, 2023 16:31
@codecov
Copy link

codecov bot commented Sep 19, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1600c03) 49.53% compared to head (291b28b) 49.55%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #15573      +/-   ##
==========================================
+ Coverage   49.53%   49.55%   +0.02%     
==========================================
  Files         269      269              
  Lines       47222    47243      +21     
==========================================
+ Hits        23392    23413      +21     
  Misses      21530    21530              
  Partials     2300     2300              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Prashant Shahi <[email protected]>
Copy link
Member

@blakepettersson blakepettersson left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

@prashant-shahi
Copy link
Contributor Author

@blakepettersson Thanks for the review.

@@ -206,6 +208,8 @@ func NewCommand() *cobra.Command {
command.Flags().BoolVar(&repoServerStrictTLS, "repo-server-strict-tls", env.ParseBoolFromEnv("ARGOCD_APPLICATION_CONTROLLER_REPO_SERVER_STRICT_TLS", false), "Whether to use strict validation of the TLS cert presented by the repo server")
command.Flags().StringSliceVar(&metricsAplicationLabels, "metrics-application-labels", []string{}, "List of Application labels that will be added to the argocd_application_labels metric")
command.Flags().StringVar(&otlpAddress, "otlp-address", env.StringFromEnv("ARGOCD_APPLICATION_CONTROLLER_OTLP_ADDRESS", ""), "OpenTelemetry collector address to send traces to")
command.Flags().BoolVar(&otlpInsecure, "otlp-insecure", env.ParseBoolFromEnv("ARGOCD_APPLICATION_CONTROLLER_OTLP_INSECURE", true), "OpenTelemetry collector insecure mode")
command.Flags().StringToStringVar(&otlpHeaders, "otlp-headers", env.ParseStringToStringFromEnv("ARGOCD_SERVER_OTLP_HEADERS", map[string]string{}, ","), "List of OpenTelemetry collector extra headers sent with traces, headers are comma-separated key-value pairs(e.g. key1=value1,key2=value2)")
Copy link
Member

Choose a reason for hiding this comment

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

Can you add this to the deployment manifest here and to the argocd cmd cm here and run codgen.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@gdsoumya updated

Copy link
Member

@gdsoumya gdsoumya left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for the contribution.

@gdsoumya
Copy link
Member

@prashant-shahi codegen ci step is failing can you run make codegen and check.

@gdsoumya gdsoumya merged commit 11df990 into argoproj:master Nov 27, 2023
25 checks passed
@prashant-shahi prashant-shahi deleted the chore/extra-otlp-opts branch November 27, 2023 05:16
@prashant-shahi
Copy link
Contributor Author

@gdsoumya Thanks a lot for the review! 🎉

vladfr pushed a commit to vladfr/argo-cd that referenced this pull request Dec 13, 2023
…rgoproj#15573)

* feat(opentelemetry): ✨ support for secured OTLP endpoint and headers

Signed-off-by: Prashant Shahi <[email protected]>

* docs(opentelemetry): 📝 include new otlp headers in docs

Signed-off-by: Prashant Shahi <[email protected]>

* docs(opentelemetry): 📝 update readme docs as per integration tests

Signed-off-by: Prashant Shahi <[email protected]>

* docs(opentelemetry): 📝 update readme docs as per integration tests

Signed-off-by: Prashant Shahi <[email protected]>

* chore: resolve indentation issues

Signed-off-by: Prashant Shahi <[email protected]>

* chore: fix indentation issues

Signed-off-by: Prashant Shahi <[email protected]>

* chore: include OTLP options in deployment manifests

Signed-off-by: Prashant Shahi <[email protected]>

* fix: update manifests to resolve failing CI

Signed-off-by: Prashant Shahi <[email protected]>

---------

Signed-off-by: Prashant Shahi <[email protected]>
tesla59 pushed a commit to tesla59/argo-cd that referenced this pull request Dec 16, 2023
…rgoproj#15573)

* feat(opentelemetry): ✨ support for secured OTLP endpoint and headers

Signed-off-by: Prashant Shahi <[email protected]>

* docs(opentelemetry): 📝 include new otlp headers in docs

Signed-off-by: Prashant Shahi <[email protected]>

* docs(opentelemetry): 📝 update readme docs as per integration tests

Signed-off-by: Prashant Shahi <[email protected]>

* docs(opentelemetry): 📝 update readme docs as per integration tests

Signed-off-by: Prashant Shahi <[email protected]>

* chore: resolve indentation issues

Signed-off-by: Prashant Shahi <[email protected]>

* chore: fix indentation issues

Signed-off-by: Prashant Shahi <[email protected]>

* chore: include OTLP options in deployment manifests

Signed-off-by: Prashant Shahi <[email protected]>

* fix: update manifests to resolve failing CI

Signed-off-by: Prashant Shahi <[email protected]>

---------

Signed-off-by: Prashant Shahi <[email protected]>
lyda pushed a commit to lyda/argo-cd that referenced this pull request Mar 28, 2024
…rgoproj#15573)

* feat(opentelemetry): ✨ support for secured OTLP endpoint and headers

Signed-off-by: Prashant Shahi <[email protected]>

* docs(opentelemetry): 📝 include new otlp headers in docs

Signed-off-by: Prashant Shahi <[email protected]>

* docs(opentelemetry): 📝 update readme docs as per integration tests

Signed-off-by: Prashant Shahi <[email protected]>

* docs(opentelemetry): 📝 update readme docs as per integration tests

Signed-off-by: Prashant Shahi <[email protected]>

* chore: resolve indentation issues

Signed-off-by: Prashant Shahi <[email protected]>

* chore: fix indentation issues

Signed-off-by: Prashant Shahi <[email protected]>

* chore: include OTLP options in deployment manifests

Signed-off-by: Prashant Shahi <[email protected]>

* fix: update manifests to resolve failing CI

Signed-off-by: Prashant Shahi <[email protected]>

---------

Signed-off-by: Prashant Shahi <[email protected]>
Signed-off-by: Kevin Lyda <[email protected]>
Hariharasuthan99 pushed a commit to AmadeusITGroup/argo-cd that referenced this pull request Jun 16, 2024
…rgoproj#15573)

* feat(opentelemetry): ✨ support for secured OTLP endpoint and headers

Signed-off-by: Prashant Shahi <[email protected]>

* docs(opentelemetry): 📝 include new otlp headers in docs

Signed-off-by: Prashant Shahi <[email protected]>

* docs(opentelemetry): 📝 update readme docs as per integration tests

Signed-off-by: Prashant Shahi <[email protected]>

* docs(opentelemetry): 📝 update readme docs as per integration tests

Signed-off-by: Prashant Shahi <[email protected]>

* chore: resolve indentation issues

Signed-off-by: Prashant Shahi <[email protected]>

* chore: fix indentation issues

Signed-off-by: Prashant Shahi <[email protected]>

* chore: include OTLP options in deployment manifests

Signed-off-by: Prashant Shahi <[email protected]>

* fix: update manifests to resolve failing CI

Signed-off-by: Prashant Shahi <[email protected]>

---------

Signed-off-by: Prashant Shahi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
3 participants