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

Public API Span Labels Length Issue #582

Closed
soumithx opened this issue Nov 1, 2019 · 15 comments
Closed

Public API Span Labels Length Issue #582

soumithx opened this issue Nov 1, 2019 · 15 comments
Labels

Comments

@soumithx
Copy link

soumithx commented Nov 1, 2019

Captured Span Label Values Show truncating String,

I am using dotnet apm public api.

my requirement is to assign a label to span which is large text( Generally its large XML String),
if i do that in general way ,it shows truncated string instead of full string on kibanna dashboard.

if there any solution exist, Greatly Appreciated .

@soumithx soumithx added the bug Something isn't working label Nov 1, 2019
@gregkalapos
Copy link
Contributor

Hi @soumithx,

labels are truncated to 1024 characters, so I'm afraid you won't be able to store very long XMLs there.

This is specified in the API between the agent and the APM server, so this statement holds to all Elastic APM agents, so this isn't specific to the .NET APM Agent - so what I want to say with this second part is that this is not something we could easily change in the agent.

@gregkalapos gregkalapos added discuss and removed bug Something isn't working labels Nov 1, 2019
@gregkalapos
Copy link
Contributor

Removed the bug label, because this is by design.

@soumithx
Copy link
Author

soumithx commented Nov 1, 2019

@gregkalapos ,

Hi Greg , then what is best way to display , is there any custom instrumentation we can apply to achieve ?

@gregkalapos
Copy link
Contributor

@gregkalapos ,

Hi Greg , then what is best way to display , is there any custom instrumentation we can apply to achieve ?

I'm not sure we have anything on the public API that you can use to transfer that amount of data. The big problem with this would be that this could lead to huge data usage by elasticsearch very easily.

Off the top of my head, I'm not sure if we have any field where you could transfer unlimited data to the APM server, but I asked the rest of the team if we have something on the APM server API to this - I'll report back here once I know more. If there is something we could expose thorough the agent API then I'm totally open for considering it.

Could you maybe say a little bit more about your use case? Like, what kind of span is this? Where is the XML coming from?

@soumithx
Copy link
Author

soumithx commented Nov 1, 2019

@gregkalapos ,

its custom Captured Span through public Api, i can say this is not pure XML ,but its an just XML look like string which created by Stringbuilder

@soumithx
Copy link
Author

soumithx commented Nov 1, 2019

some how , i got breakthrough by attaching that string as Context.Db Database statement .....

still , that size is not yet completely fitted

@gregkalapos
Copy link
Contributor

some how , i got breakthrough by attaching that string as Context.Db Database statement .....

still , that size is not yet completely fitted

:) the limit on that is 10000. Plus the other problem is that that is not intended for this use case.

Soo.. there is 1 field on the Transaction in the APM Server's intake API that we could use for this: https://github.com/elastic/apm-server/blob/master/docs/spec/context.json#L7

That field is unfortunately not yet exposed in .NET, but we could add it. The only thing with this is that it is on the Transaction, so still not something for Spans.

Here is how it's exposed in the Java agent.

@soumithx
Copy link
Author

soumithx commented Nov 1, 2019

@gregkalapos ,
If you add it. That works for me :)

@gregkalapos
Copy link
Contributor

@gregkalapos ,
If you add it. That works for me :)

Perfect! From what I see right now (Friday night 23:05 for me here :) ) I think we can easily add it. I'll follow up on this.

@soumithx
Copy link
Author

soumithx commented Nov 2, 2019

Thanks alot :)

@soumithx
Copy link
Author

soumithx commented Nov 3, 2019

Hi @gregkalapos ,

Any update ?

@gregkalapos
Copy link
Contributor

gregkalapos commented Nov 5, 2019

@soumithx I opened #585.

First that needs to be reviewed and merged, and once that's done it'll be in the next release. This milestone has all the issues we planned for the next release, so probably once that goes to 0 open issues we'll have this release.

@soumithx
Copy link
Author

soumithx commented Nov 5, 2019

Thanks @gregkalapos 🥇

@SergeyKleyman
Copy link
Contributor

I think it's the same feature as the one at #419

@gregkalapos
Copy link
Contributor

Implemented in #585.

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

No branches or pull requests

3 participants