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

Capability to manually add attributes to spans #91

Open
cyrille-leclerc opened this issue May 5, 2021 · 1 comment
Open

Capability to manually add attributes to spans #91

cyrille-leclerc opened this issue May 5, 2021 · 1 comment
Labels
enhancement New feature or request waiting-for-user

Comments

@cyrille-leclerc
Copy link
Contributor

cyrille-leclerc commented May 5, 2021

Problem description

I want to manually add attributes to spans in my pipeline, similar to manually adding attributes to spans when instrumenting applications with distributed tracing.

Example use cases

  • Add informations on shell steps to indicate the purpose of the shell step (e.g. an sh 'docker login -u $user -p $pass my.docker.registry')
    • ❓ How to add attributes to atomic built-in steps ("non wrapping steps") like the sh step?

Exemple with the OpenTelemetry APIs for Java

Span currentSpan = Span.current();
currentSpan.setAttribute(""net.peer.name", "my.docker.registry");
currentSpan.setAttribute(""rpc.service", "docker");
currentSpan.setAttribute(""rpc.method", "login");

See other problem statements

Proposed solutions

addAttributes() pipeline step

TODO

adding an attributes attribute to the built-in steps

TODO

@cyrille-leclerc cyrille-leclerc changed the title WIP Capability to manually add attributes to spans Capability to manually add attributes to spans May 5, 2021
@cyrille-leclerc cyrille-leclerc added the enhancement New feature or request label May 6, 2021
@kuisathaverat
Copy link
Contributor

I think this is already supported by using these steps:

  • withSpanAttribute(key, value[, type][, target])
  • setSpanAttributes([spanAttribute(key, value[, type][, target])])
  • withSpanAttributes([spanAttribute(key, value[, type][, target])])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request waiting-for-user
Projects
None yet
Development

No branches or pull requests

2 participants