[9.0] [APM] remove unnecessary field service.environment from top dependency spans endpoint (#215321) (#215361)

# Backport

This will backport the following commits from `main` to `9.0`:
- [[APM] remove unnecessary field service.environment from top
dependency spans endpoint
(#215321)](https://github.com/elastic/kibana/pull/215321)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Sergi
Romeu","email":"sergi.romeu@elastic.co"},"sourceCommit":{"committedDate":"2025-03-20T15:31:36Z","message":"[APM]
remove unnecessary field service.environment from top dependency spans
endpoint (#215321)\n\n## Summary\n\nFixes #215106\n\nThis PR removes
`service.environment` as a required field for\n`getTopDependencySpans`
endpoint.\nIt was not used at all, so it can be safely removed without
adapting
the\nUI.","sha":"8193e56970757edc96fef17b18c6accbc1fad0dd","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","apm","Team:obs-ux-infra_services","backport:version","v9.1.0","v8.19.0","v9.0.1"],"title":"[APM]
remove unnecessary field service.environment from top dependency spans
endpoint","number":215321,"url":"https://github.com/elastic/kibana/pull/215321","mergeCommit":{"message":"[APM]
remove unnecessary field service.environment from top dependency spans
endpoint (#215321)\n\n## Summary\n\nFixes #215106\n\nThis PR removes
`service.environment` as a required field for\n`getTopDependencySpans`
endpoint.\nIt was not used at all, so it can be safely removed without
adapting
the\nUI.","sha":"8193e56970757edc96fef17b18c6accbc1fad0dd"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/215321","number":215321,"mergeCommit":{"message":"[APM]
remove unnecessary field service.environment from top dependency spans
endpoint (#215321)\n\n## Summary\n\nFixes #215106\n\nThis PR removes
`service.environment` as a required field for\n`getTopDependencySpans`
endpoint.\nIt was not used at all, so it can be safely removed without
adapting
the\nUI.","sha":"8193e56970757edc96fef17b18c6accbc1fad0dd"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Sergi Romeu <sergi.romeu@elastic.co>
This commit is contained in:
Kibana Machine 2025-03-20 18:17:17 +01:00 committed by GitHub
parent da3bedee1c
commit 3d44c1d207
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -14,7 +14,6 @@ import {
AGENT_NAME,
AT_TIMESTAMP,
EVENT_OUTCOME,
SERVICE_ENVIRONMENT,
SERVICE_NAME,
SPAN_DESTINATION_SERVICE_RESOURCE,
SPAN_DURATION,
@ -74,7 +73,6 @@ export async function getTopDependencySpans({
TRACE_ID,
SPAN_NAME,
SERVICE_NAME,
SERVICE_ENVIRONMENT,
AGENT_NAME,
SPAN_DURATION,
EVENT_OUTCOME,