-
Notifications
You must be signed in to change notification settings - Fork 784
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
Truncate span names at 255 characters #723
Comments
URLs tend to be a bad choice for span names as they end up with variable |
meant "RPC name (ex function name)" |
From @pennstatephil on October 3, 2017 16:0 On further inspection, this is an issue with the way Spring Cloud Sleuth picks span names: TraceFilter.java line 136: When "uri" is really long, we start seeing these issues. I can migrate this issue over to that project... Or, is there an easy way to override the span name? edited to add: looks like it's been reported here: #500 |
revised description |
We're truncating already at 50 chars according to #530 . Do you want to extend this value to 255 ? |
hmm wasn't aware of that, but it seems a long span name snuck through
somehow..
|
Maybe an older version of sleuth was used? |
Just some info-- we're on Camden release train; SR7 had Sleuth 1.1.4, which looks like it should have included #530, right? Looks like it was targeted for 1.1.3... |
You can check if your DefaultTracer contains the line of code that truncates the name. If it doesn't then you have to upgrade (btw camden is ancient) if it does then we have a bug |
You're right, we're on very old code. This is good ammunition to try and get my team up to Dalston. Thanks! |
Zipkin tracers usually default span names to the http method or RPC name as things like URLs can include variables that have two effects:
The current naming convention doesn't prevent these situations from occurring. We should at least limit (truncate) the length to 255 characters as multiple systems only index that much. The full url can still exist as a tag and be searchable by that.
From @pennstatephil on September 29, 2017 15:27
Currently, "name" in the database is limited to 255 characters. We have some REALLY long URLs (I know it's not ideal) and this causes a SQL exception:
[ZipkinMySQLStorage-1] zipkin.server.ZipkinHttpCollector : Cannot store spans [bc4e3b8f7025cbde.aff2ed227e2cea87<:bc4e3b8f7025cbde, bc4e3b8f7025cbde.aff2ed227e2cea87<:bc4e3b8f7025cbde, 4bad878142e4c587.069ffdef649e62c4<:c603f78125156b83, 4bad878142e4c587.c603f78125156b83<:4bad878142e4c587] due to DataAccessException(SQL [null]; Data truncation: Data too long for column 'name' at row 1)
Trying to increase the field ourselves causes a key length error:
17:07:35 alter table zipkin.zipkin_spans modify column name varchar(400) Error Code: 1071. Specified key was too long; max key length is 767 bytes 0.00033 sec
Is there any way to get a longer name supported? If not, is there a recommended practice we can follow to work around the issue?
Copied from original issue: openzipkin/zipkin#1751
The text was updated successfully, but these errors were encountered: