diff --git a/NOTICE.txt b/NOTICE.txt index 2d38133d86a..1fd3a4dc967 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -362,11 +362,11 @@ these terms. -------------------------------------------------------------------------------- Dependency : github.com/elastic/apm-data -Version: v0.1.1-0.20240206093737-3b28495c3cbd +Version: v0.1.1-0.20240207135100-668fa4836cc3 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/elastic/apm-data@v0.1.1-0.20240206093737-3b28495c3cbd/LICENSE: +Contents of probable licence file $GOMODCACHE/github.com/elastic/apm-data@v0.1.1-0.20240207135100-668fa4836cc3/LICENSE: Apache License Version 2.0, January 2004 diff --git a/changelogs/head.asciidoc b/changelogs/head.asciidoc index 9afb6d6c750..9f127999d7d 100644 --- a/changelogs/head.asciidoc +++ b/changelogs/head.asciidoc @@ -22,3 +22,4 @@ https://github.com/elastic/apm-server/compare/8.12\...main[View commits] - `http.request.body.bytes` now reports the bytes read from request body even if Content-Length is -1 {pull}12451[12451] - Use `messaging.system` and `messaging.operation` to detect OTel messaging span for transactions {pull}12506[12506] - Add support for OTel data stream routing by parsing `data_stream.dataset` and `data_stream.namespace` from: (from lowest to highest precedence) resource attributes, instrumentation scope attributes, and signal-level attributes. This is a breaking change only for users relying on the existing `data_stream` attributes being stored as labels. {pull}12578[12578] +- Map OTel transaction `elastic.profiler_stack_trace_ids` attribute {pull}12493[12493] diff --git a/go.mod b/go.mod index f9dbb4644b6..16abce505f9 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/dgraph-io/badger/v2 v2.2007.4 github.com/dustin/go-humanize v1.0.1 github.com/elastic/apm-aggregation v0.0.0-20230815024520-e75a37d9ddd6 - github.com/elastic/apm-data v0.1.1-0.20240206093737-3b28495c3cbd + github.com/elastic/apm-data v0.1.1-0.20240207135100-668fa4836cc3 github.com/elastic/beats/v7 v7.0.0-alpha2.0.20240207112521-625ba402b8db github.com/elastic/elastic-agent-client/v7 v7.8.0 github.com/elastic/elastic-agent-libs v0.7.5 diff --git a/go.sum b/go.sum index 55e392f58c8..1aa07e03713 100644 --- a/go.sum +++ b/go.sum @@ -132,8 +132,8 @@ github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFP github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= github.com/elastic/apm-aggregation v0.0.0-20230815024520-e75a37d9ddd6 h1:Js+C3HEE0a5BDFmhEmJV/Uo4uzj/paHjd7yl6+KYguw= github.com/elastic/apm-aggregation v0.0.0-20230815024520-e75a37d9ddd6/go.mod h1:ba3gaJCuhxXN/O5AuiI56xxd6DukQdVOK0NfpzBntNo= -github.com/elastic/apm-data v0.1.1-0.20240206093737-3b28495c3cbd h1:XKBsMg01zVauBEw/TjaEvfVxnwvZB+TKpioBZonAmkw= -github.com/elastic/apm-data v0.1.1-0.20240206093737-3b28495c3cbd/go.mod h1:z4iJVl8vyQa5v5o7UapWGHTsycBKsKfJfILuf2TZpYo= +github.com/elastic/apm-data v0.1.1-0.20240207135100-668fa4836cc3 h1:2xDWspjzDCjMgrHEvuzh5owLBv6gZd4z8LwnC0nSl18= +github.com/elastic/apm-data v0.1.1-0.20240207135100-668fa4836cc3/go.mod h1:QUZMN5IFWhqbNfSUQxvd7Tuj7tx/6NoVJpFLAXd8ScY= github.com/elastic/beats/v7 v7.0.0-alpha2.0.20240207112521-625ba402b8db h1:nSZmeF2n4rWgZeviaErdQuTKephNbKRdVqjjkGOkbBs= github.com/elastic/beats/v7 v7.0.0-alpha2.0.20240207112521-625ba402b8db/go.mod h1:zqd/weIZvWV856AAltUc0eho6iAEKHx2TC4EXjoWQGE= github.com/elastic/elastic-agent-autodiscover v0.6.7 h1:+KVjltN0rPsBrU8b156gV4lOTBgG/vt0efFCFARrf3g= diff --git a/systemtest/approvals/TestIntake/Transactions.approved.json b/systemtest/approvals/TestIntake/Transactions.approved.json index a3df939ae5d..ffa5be2928d 100644 --- a/systemtest/approvals/TestIntake/Transactions.approved.json +++ b/systemtest/approvals/TestIntake/Transactions.approved.json @@ -284,7 +284,10 @@ "traces" ], "event.outcome": [ - "unknown" + "success" + ], + "event.success_count": [ + 1 ], "host.architecture": [ "x64" @@ -383,6 +386,9 @@ "span.id": [ "945254c567a5417e" ], + "span.kind": [ + "SERVER" + ], "timestamp.us": [ 1496170407154000 ], @@ -395,9 +401,17 @@ "transaction.id": [ "945254c567a5417e" ], + "transaction.profiler_stack_trace_ids": [ + "foo", + "bar", + "foo" + ], "transaction.representative_count": [ 1 ], + "transaction.result": [ + "Success" + ], "transaction.sampled": [ true ], diff --git a/testdata/intake-v2/transactions.ndjson b/testdata/intake-v2/transactions.ndjson index 0a3fa568d8b..33c0eab7636 100644 --- a/testdata/intake-v2/transactions.ndjson +++ b/testdata/intake-v2/transactions.ndjson @@ -1,5 +1,5 @@ {"metadata": {"service": {"name": "1234_service-12a3","node": {"configured_name": "node-123"},"version": "5.1.3","environment": "staging","language": {"name": "ecmascript","version": "8"},"runtime": {"name": "node","version": "8.0.0"},"framework": {"name": "Express","version": "1.2.3"},"agent": {"name": "elastic-node", "activation_method": "some_activation_method","version": "3.14.0"}},"user": {"id": "123user", "username": "bar", "email": "bar@user.com"}, "labels": {"tag0": null, "tag1": "one", "tag2": 2}, "process": {"pid": 1234,"ppid": 6789,"title": "node","argv": ["node","server.js"]},"system": {"hostname": "prod1.example.com","architecture": "x64","platform": "darwin", "container": {"id": "container-id"}, "kubernetes": {"namespace": "namespace1", "pod": {"uid": "pod-uid", "name": "pod-name"}, "node": {"name": "node-name"}}},"cloud":{"account":{"id":"account_id","name":"account_name"},"availability_zone":"cloud_availability_zone","instance":{"id":"instance_id","name":"instance_name"},"machine":{"type":"machine_type"},"project":{"id":"project_id","name":"project_name"},"provider":"cloud_provider","region":"cloud_region","service":{"name":"lambda"}}}} -{"transaction": { "id": "945254c567a5417e", "trace_id": "0123456789abcdef0123456789abcdef", "parent_id": "abcdefabcdef01234567", "type": "request", "duration": 32.592981, "timestamp": 1496170407154000, "span_count": { "started": 43 }}} +{"transaction": { "id": "945254c567a5417e", "trace_id": "0123456789abcdef0123456789abcdef", "parent_id": "abcdefabcdef01234567", "type": "request", "duration": 32.592981, "timestamp": 1496170407154000, "span_count": { "started": 43 }, "otel": { "attributes" : { "elastic.profiler_stack_trace_ids" : ["foo", "bar", "foo"]}}}} {"transaction": {"id": "4340a8e0df1906ecbfa9", "trace_id": "0acd456789abcdef0123456789abcdef", "name": "GET /api/types","type": "request","duration": 32.592981,"outcome":"success", "result": "success", "timestamp": 1496170407154000, "sampled": true, "span_count": {"started": 17},"context": {"service": {"runtime": {"version": "7.0"}},"page":{"referer":"http://localhost:8000/test/e2e/","url":"http://localhost:8000/test/e2e/general-usecase/"}, "request": {"socket": {"remote_address": "12.53.12.1","encrypted": true},"http_version": "1.1","method": "POST","url": {"protocol": "https:","full": "https://www.example.com/p/a/t/h?query=string#hash","hostname": "www.example.com","port": "8080","pathname": "/p/a/t/h","search": "?query=string","hash": "#hash","raw": "/p/a/t/h?query=string#hash"},"headers": {"user-agent":["Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36","Mozilla Chrome Edge"],"content-type": "text/html","cookie": "c1=v1, c2=v2","some-other-header": "foo","array": ["foo","bar","baz"]},"cookies": {"c1": "v1","c2": "v2"},"env": {"SERVER_SOFTWARE": "nginx","GATEWAY_INTERFACE": "CGI/1.1"},"body": {"str": "hello world","additional": { "foo": {},"bar": 123,"req": "additional information"}}},"response": {"status_code": 200,"headers": {"content-type": "application/json"},"headers_sent": true,"finished": true,"transfer_size":258,"encoded_body_size":2690,"decoded_body_size":2990}, "user": {"domain": "ldap://abc","id": "99","username": "foo"},"tags": {"organization_uuid": "9f0e9d64-c185-4d21-a6f4-4673ed561ec8", "tag2": 12, "tag3": 12.45, "tag4": false, "tag5": null },"custom": {"my_key": 1,"some_other_value": "foo bar","and_objects": {"foo": ["bar","baz"]},"(": "not a valid regex and that is fine"}}}} {"transaction": { "id": "cdef4340a8e0df19", "trace_id": "0acd456789abcdef0123456789abcdef", "type": "request", "duration": 13.980558, "timestamp": 1532976822281000, "sampled": null, "span_count": { "dropped": 55, "started": 436 }, "marks": {"navigationTiming": {"appBeforeBootstrap": 608.9300000000001,"navigationStart": -21},"another_mark": {"some_long": 10,"some_float": 10.0}, "performance": {}}, "context": { "request": { "socket": { "remote_address": "192.0.1", "encrypted": null }, "method": "POST", "headers": { "user-agent": [], "content-type": [], "cookie": [] }, "url": { "protocol": null, "full": null, "hostname": null, "port": null, "pathname": null, "search": null, "hash": null, "raw": null } }, "response": { "headers": { "content-type": [] } }, "service": {"environment":"testing","name": "service1","node": {"configured_name": "node-ABC"}, "language": {"version": "2.5", "name": "ruby"}, "agent": {"version": "2.2", "name": "elastic-ruby", "ephemeral_id": "justanid"}, "framework": {"version": "5.0", "name": "Rails"}, "version": "2", "runtime": {"version": "2.5", "name": "cruby"}}},"experience":{"cls":1,"fid":2.0,"tbt":3.4,"longtask":{"count":3,"sum":2.5,"max":1}}}} {"transaction": { "id": "00xxxxFFaaaa1234", "trace_id": "0123456789abcdef0123456789abcdef", "name": "amqp receive", "parent_id": "abcdefabcdef01234567", "type": "messaging", "duration": 3, "timestamp": 1496170407154000, "span_count": { "started": 1 }, "context": {"message": {"queue": { "name": "new_users"}, "age":{ "ms": 1577958057123}, "headers": {"user_id": "1ax3", "involved_services": ["user", "auth"]}, "body": "user created", "routing_key": "user-created-transaction"}},"session":{"id":"sunday","sequence":123}}}