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

Add 'trace' command support for Gitlab #1169

Closed
ahawtho opened this issue Feb 2, 2024 · 4 comments
Closed

Add 'trace' command support for Gitlab #1169

ahawtho opened this issue Feb 2, 2024 · 4 comments
Assignees
Labels
ci-visibility Related to [junit, gate, metric, tag, trace, dora, deployment] enhancement New feature or request

Comments

@ahawtho
Copy link

ahawtho commented Feb 2, 2024

Feature request description

Currently, the trace command only supports CircleCI and Jenkins. We use self-managed Gitlab and I would love to be able to see our custom commands in the flame graph from the CI Pipeline Executions page.

Solution

The following should be successful:

echo $GITLAB_CI  # emits "true"
datadog-ci trace --name 'My custom command' -- command arg1 arg2 

Additional context

We have several complex build jobs that have individual tasks. We have instrumented timing of these with custom metrics, but we don't have a way to include the timing in the flame graph on the CI pipeline executions detail pages in Datadog. It seems it would be straightforward to add support within this tool, but it's not clear to me if the server side requires additional work to support custom trace data.

Command

trace

@ahawtho ahawtho added the enhancement New feature or request label Feb 2, 2024
@github-actions github-actions bot added the ci-visibility Related to [junit, gate, metric, tag, trace, dora, deployment] label Feb 2, 2024
@AdrianLC
Copy link
Contributor

AdrianLC commented Feb 5, 2024

Unfortunately we have some stateful details that are not available until the Gitlab pipeline finishes.

It's related to how we splits retries into separate flame graphs. For the trace command we need the ID that identifies the flame graph and this does not exist yet at the point where the command runs from within the Gitlab job.

In short we don't have a solution to this so far. Sorry

@ramblingenzyme
Copy link

@AdrianLC Between GITHUB_RUN_ID and GITHUB_RUN_ATTEMPT, is there enough detail to implement the trace command for Github, and should I create another issue to track that?

https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables

@juan-fernandez
Copy link
Contributor

@ahawtho, thanks for reporting! We consider this completed with #1369. The feature will be released soon 😄

@ahawtho
Copy link
Author

ahawtho commented Jul 24, 2024

I'm curious how the problem with retries was addressed, is there an MR or more info?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-visibility Related to [junit, gate, metric, tag, trace, dora, deployment] enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants