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

Prototype to show how Typed Spans can be implemented #964

Closed

Conversation

thisthat
Copy link
Member

@thisthat thisthat commented Mar 5, 2020

This prototype addresses the discussion of #778

* Semantic Attributes
* https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/data-http.md
*/
public static final String METHOD_KEY = "http.method";
Copy link
Member

Choose a reason for hiding this comment

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

This should later be switched to use #758.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is just a prototype to showcase how the API should look like. It is not meant to be merged

/** Set up status code to "reason phrase" map. */
static {
// HTTP 1.0 Server status codes -- see RFC 1945
addStatusCodeMap(SC_OK, "OK");
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need to add the status description. The status_text is optional and I think it should be left out if it adds no information beyond the status code integer.

@trask
Copy link
Member

trask commented Mar 6, 2020

Hi @thisthat! Any chance you can join the auto-instr-java SIG meeting next Thu at 9am Pacific Time and we can discuss the two typed spans proposals? I think the auto-instrumentation project would be a good place to incubate this idea, and once we prove it out (apply it to all of the auto-instrumentation), we can promote it to this repo.

@thisthat
Copy link
Member Author

thisthat commented Mar 6, 2020

@trask sure! Sounds a good idea!

@Oberon00
Copy link
Member

Oberon00 commented Mar 6, 2020

I'd strongly prefer this to be in the main opentelemetry-java repository in a contrib package, even if auto-instr is among the first users.
EDIT: To add some arguments for that preference, I think typed spans are not of particular importance to auto instrumentation IMHO. Of course they are extremely useful for auto-instrumentation too, but also for manual/ad-hoc instrumentation, probably even more.

import io.opentelemetry.trace.Span;

public abstract class BaseSpanWrapper {
Span span;
Copy link
Contributor

Choose a reason for hiding this comment

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

It doesn't feel like this is pulling much weight, and maybe just adding extra mental overhead. Do you imagine more things going in here?

Copy link
Member Author

Choose a reason for hiding this comment

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

We might insert some hook mechanism for the auto-instrumentation people.

Copy link
Member

@Oberon00 Oberon00 Mar 13, 2020

Choose a reason for hiding this comment

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

After seeing open-telemetry/opentelemetry-java-instrumentation#195, I think what the auto-instrumentation SIG calls typed spans is actually unrelated to this PR, so I wonder if we will ever need any hooks.

@Oberon00
Copy link
Member

Note that there is concept also currently called "typed spans" in the auto-instrumentation repository, but apart from the name it seems to be mostly unrelated: open-telemetry/opentelemetry-java-instrumentation#195

@jkwatson
Copy link
Contributor

jkwatson commented Apr 1, 2020

Does this need to be kept open, or has it fulfilled its purpose?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants