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

Remove timeseries.instance #9565

Merged
merged 2 commits into from
Nov 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions apmpackage/apm/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
- description: Add mappings for `transaction.representative_count` and `span.representative_count`
type: enhancement
link: https://github.com/elastic/apm-server/pull/9458
- description: Remove `timeseries.instance` field
type: enhancement
link: https://github.com/elastic/apm-server/pull/9565
- version: "8.5.0"
changes:
- description: Add package settings to enable the experimental collection of service metrics
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ processors:
- remove:
field: _metric_descriptions
ignore_missing: true
- remove:
# Removed in 8.6.0
field: timeseries.instance
axw marked this conversation as resolved.
Show resolved Hide resolved
ignore_missing: true
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,6 @@
type: keyword
description: |
Keyword of specific relevance in the service's domain (eg: 'db.postgresql.query', 'template.erb', 'cache', etc).
- name: timeseries.instance
type: keyword
description: Time series instance ID
- name: transaction.failure_count
type: long
description: "Count of transactions with 'event.outcome: failure'"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,6 @@ processors:
if: ctx.data_stream != null
field: _index
value: "{{data_stream.type}}-{{data_stream.dataset}}-{{data_stream.namespace}}"
- remove:
field: timeseries # remove timeseries.instance
ignore_missing: true
1 change: 1 addition & 0 deletions changelogs/head.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ https://github.com/elastic/apm-server/compare/8.5\...main[View commits]
- `ecs.version` is no longer added to document `_source`; it is added as a `constant_keyword` field {pull}9208[9208]
- `context.http.response.*_size` fields now enforce integer values {pull}9429[9429]
- `observer.id` and `observer.ephemeral_id` are no longer added to APM documents {pull}9412[9412]
- `timeseries.instance` has been removed from transaction metrics docs; it was never used {pull}9565[9565]

[float]
==== Deprecations
Expand Down
8 changes: 0 additions & 8 deletions internal/model/metricset.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@ type Metricset struct {
// Samples holds the metrics in the set.
Samples []MetricsetSample

// TimeseriesInstanceID holds an optional identifier for the timeseries
// instance, such as a hash of the labels used for aggregating the
// metrics.
TimeseriesInstanceID string

// Name holds an optional name for the metricset.
Name string

Expand Down Expand Up @@ -157,9 +152,6 @@ func (a *AggregatedDuration) fields() mapstr.M {
}

func (me *Metricset) setFields(fields *mapStr) {
if me.TimeseriesInstanceID != "" {
fields.set("timeseries", mapstr.M{"instance": me.TimeseriesInstanceID})
}
if me.DocCount > 0 {
fields.set("_doc_count", me.DocCount)
}
Expand Down
6 changes: 2 additions & 4 deletions internal/model/metricset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,12 @@ func TestMetricset(t *testing.T) {
},
{
Metricset: &Metricset{
TimeseriesInstanceID: "foo",
DocCount: 6,
DocCount: 6,
},
Output: mapstr.M{
"timeseries": mapstr.M{"instance": "foo"},
"_doc_count": int64(6),
},
Msg: "Timeseries instance and _doc_count",
Msg: "_doc_count",
},
{
Metricset: &Metricset{
Expand Down
1 change: 0 additions & 1 deletion systemtest/approvals.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ var apmEventSortFields = []string{
"transaction.id",
"span.id",
"error.id",
"timeseries.instance",
"span.destination.service.resource",
"transaction.type",
"span.type",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,66 @@
}
}
},
{
"@timestamp": "2022-09-12T03:52:00.000Z",
"agent": {
"name": "go"
},
"container": {
"id": "spawn-6cd7c2e1-43d5-4c89-8480-e178b3bc70d1"
},
"data_stream": {
"dataset": "apm.internal",
"namespace": "migrated",
"type": "metrics"
},
"ecs": {
"version": "dynamic"
},
"event": {
"agent_id_status": "missing",
"ingested": "dynamic",
"outcome": "failure"
},
"host": {
"hostname": "corduroy",
"name": "corduroy"
},
"metricset": {
"name": "transaction"
},
"observer": {
"hostname": "dynamic",
"name": "instance-0000000000",
"type": "apm-server",
"version": "dynamic"
},
"processor": {
"event": "metric",
"name": "metric"
},
"service": {
"name": "main",
"node": {
"name": "spawn-6cd7c2e1-43d5-4c89-8480-e178b3bc70d1"
}
},
"transaction": {
"duration": {
"histogram": {
"counts": [
1
],
"values": [
10239
]
}
},
"name": "name",
"root": true,
"type": "type"
}
},
{
"@timestamp": "2022-09-12T03:52:51.178Z",
"agent": {
Expand Down Expand Up @@ -465,69 +525,6 @@
}
}
},
{
"@timestamp": "2022-09-12T03:52:00.000Z",
"agent": {
"name": "go"
},
"container": {
"id": "spawn-6cd7c2e1-43d5-4c89-8480-e178b3bc70d1"
},
"data_stream": {
"dataset": "apm.internal",
"namespace": "migrated",
"type": "metrics"
},
"ecs": {
"version": "dynamic"
},
"event": {
"agent_id_status": "missing",
"ingested": "dynamic",
"outcome": "failure"
},
"host": {
"hostname": "corduroy",
"name": "corduroy"
},
"metricset": {
"name": "transaction"
},
"observer": {
"hostname": "dynamic",
"name": "instance-0000000000",
"type": "apm-server",
"version": "dynamic"
},
"processor": {
"event": "metric",
"name": "metric"
},
"service": {
"name": "main",
"node": {
"name": "spawn-6cd7c2e1-43d5-4c89-8480-e178b3bc70d1"
}
},
"timeseries": {
"instance": "main:name:5b6121c8e3ec693e"
},
"transaction": {
"duration": {
"histogram": {
"counts": [
1
],
"values": [
10239
]
}
},
"name": "name",
"root": true,
"type": "type"
}
},
{
"@timestamp": "2022-09-12T03:52:50.929Z",
"agent": {
Expand Down
Loading