-
Notifications
You must be signed in to change notification settings - Fork 49
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
Add a link to Datadog to job details page #447
base: nikita-tkachenko/configuration-refactoring-updated
Are you sure you want to change the base?
Add a link to Datadog to job details page #447
Conversation
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.
Requested changes as the link does not take into account the datacenter region. (Host is different between them)
public DatadogLinkAction(BuildData buildData) { // ci.pipeline.url%3A"https%3A%2F%2Fgoogle.com" | ||
String query = String.format("ci_level:pipeline @ci.pipeline.name:\"%s\" @ci.pipeline.number:%s", buildData.getJobName(), buildData.getBuildNumber("")); | ||
String urlEncodedQuery = URLEncoder.encode(query, StandardCharsets.UTF_8); | ||
this.url = String.format("https://app.datadoghq.com/ci/pipeline-executions?query=%s", urlEncodedQuery); |
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.
The host will be different depending on the datacenter and/or, if the org has custom subdomains.
E.g. For orgs in Europe, the url is https://app.datadoghq.eu/.........
, etc.
This is typically resolved by asking customer to provide a DD_SITE
environment variable (this does not cover custom subdomains, tho). For Jenkins, this does not seem the best approach, as it has its own config page.
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.
I know it's the case when using the intakes, but is it the same when logging in to the UI though? I thought for the app the URL is always the same, as in the static docs we have https://app.datadoghq.com
hardcoded.
I might be wrong though, will try asking someone who knows
… when reporting to agent
9bf640e
to
490a0c7
Compare
5f3a210
to
d20b98e
Compare
Requirements for Contributing to this repository
What does this PR do?
If CI Visibility is enabled, adds a "View in Datadog" link to the details page of every traced job.
Description of the Change
Alternate Designs
Possible Drawbacks
Verification Process
Tested manually.
Additional Notes
Release Notes
Review checklist (to be filled by reviewers)
changelog/
label attached. If applicable it should have thebackward-incompatible
label attached.do-not-merge/
label attached.kind/
andseverity/
labels attached at least.