elastic / apm

Elastic Application Performance Monitoring - resources and general issue tracking for Elastic APM.
https://www.elastic.co/apm
Apache License 2.0
384 stars 114 forks source link

Set default type for transaction and span #601

Closed simitt closed 2 years ago

simitt commented 2 years ago

Set default value

The APM UI relies on each transaction to specify a transaction.type. Not all apm agents require a type, and while the Intake API requires the field, it does not require a minimum length. Therefore the proposal is to set a default value for transaction.type in all apm agents. For fixing this in older agents, the apm-server should also set a default value (https://github.com/elastic/apm-server/issues/7376).

Additionally a similar behavior should be implemented for span.type.

basepi commented 2 years ago

If the APM server is setting the default value if it's missing, why do the agents need to care about setting the default? It's an easy enough change, I'm just curious.

felixbarny commented 2 years ago

Nothing terrible would happen if we only rely on the server for setting the default. However, I'd like agents to send valid data without relying too much on leniency and post-processing in the receiver. This also leaves the door open for changing the intake spec to require non-empty values.

basepi commented 2 years ago

Should this have been closed without a meta issue?