-
Notifications
You must be signed in to change notification settings - Fork 525
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 http to span context properties #777
Comments
FYI: We are limiting fields when they are indexed as an Elasticsearch |
Afaik this is hardcoded in beats atm. |
Thanks @simitt, I don't think |
Are you generally referring to what is currently nested as Are you suggesting to index |
@simitt, This is the span context not the transaction context which has
|
Thanks for the clarification. If we don't need to index the field, I don't see an issue with not specifying a string length limit. cc @elastic/apm-ui |
I should also clarify that even though I am taking the url structure from the |
I guess this would also apply for outgoing http requests. @beniwohli where are you currently setting the url of external http calls? |
@elastic/apm-server are we ok with this proposal? Should we work more on this? |
If the agents can align on this structure and define all attributes they'd like to have introduced I don't see an issue in implementing this. |
@hamid have you thought about just having the same structure as in the transaction i.e. Span.context.request? That would bring spans and transactions closer together instead of making them diverge more. Especially in the context of distributed tracing, it makes sense to have a more unified view of transactions and spans. I'm in line with you that |
@elastic/apm-agent-devs @roncohen please lets try make a decision about this, it has been waiting for some time. |
We decided on the agent sync meeting to align with transaction request context {
"name": "...",
"context": {
"request": {
"url": {
"raw": "http://example.com"
}
}
}
} |
@jahtalab I watched the meeting recording, and one point that didn't come up (AFAIR) was the option to align with opentracing. Our span contexts are so far relatively undefined (except for https://github.com/opentracing/specification/blob/master/semantic_conventions.md |
@beniwohli , That's only a sample payload the point is that we will define it's spec like it's defined here (possibly even use a reference to it) therefore every field is available to use (including Regarding the OT, again I think the main point of the meeting (or at least the consensus) was to align with the transaction context so it follows that we will adopt the OT naming conventions once we decide to adopt it for transaction context. |
@beniwohli @jahtalab can you talk about this offline and propose what to do? |
@beniwohli, Please let me know if my last comment is not convincing and you would like to discuss things further. |
I still think that re-using the full blown request object from the transaction context for span contexts is not the best idea, since they are two very different things, but if every body else agrees, I won't stop you. We need to move forward with this either way. |
Thanks @beniwohli , As you saw in the meeting recording we mostly agreed on aligning with transaction request, I also think there are issues with this approach but we need to move forward and reiterate later. @alvarolobato , We can move forward with this. |
As Beni said, I think the right property to use under If I could I would love to refactor the |
Update: I just had a chat with Hamid who told me that urls from the browser can be relative, e.g. In the case of outgoing requests made by backend service, where we presumably always would have the full URL available, I think it should be fine for the backend agents to just use the Also, to clarify my last paragraph in my previous comment: I'm 100% fine with aligning with the current structure we have for requests in the transaction context. I just wanted to make a note about that this structure wasn't necessarily ideal - both for transactions and spans. But there's definitely value in aligning instead of starting an incremental change. We can always do a big sweeping change in v7.0 if we feel that it's needed. |
What's the benefit of storing both the relative and the full URL? I think that's an important question for every single field we store in spans, as we already gobble up storage space pretty heavily. Can't we always figure out the full URL when the request is made? Also, |
Talked to @beniwohli IRL and decided to bring up this issue tomorrow at Agent sync meeting. The remaining topics:
|
Decided to go with @beniwohli's suggestion. I have updated the description. |
@jahtalab the update description indicates that we will not align with the transaction context as previously decided ( |
@roncohen , Yes that's correct. See previous comments. |
OK. Let's more forward with http.url 👍 |
implements elastic#777
implements elastic#777
implements elastic#777
implements elastic#777
* Add context.http.url to spans. implements #777
* Add context.http.url to spans. implements elastic#777
* Add context.http.url to spans. implements elastic#777
* Add context.http.url to spans. implements #777
For certain spans the frontend agent sends the raw url under the span context with the following structure:
We need to add this to the span context, however the raw url can be longer than our default 1024 string length limit. There are already cases that exceed this limit so we should not limit this field.
Would be great to hear your thoughts on this, @elastic/apm-server , @elastic/apm-agent-devs
cc @roncohen , @alvarolobato
Update: Decided to use the following structure:
The text was updated successfully, but these errors were encountered: