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

apmpackage: use package spec v3 #11822

Merged
merged 30 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
552328d
wip: update package manifests
kyungeunni Oct 11, 2023
777a9e5
chore: resolve validation errors
kyungeunni Oct 11, 2023
ec16218
fix: resolve validation error for dynamic_templates
kyungeunni Oct 11, 2023
4c7115c
chore: use [email protected]
kyungeunni Oct 12, 2023
9af87d8
fix: add object_type to fields type object
kyungeunni Oct 12, 2023
cd3408f
fix: do not specify number_of_shards for now
kyungeunni Oct 12, 2023
aee8701
Merge remote-tracking branch 'upstream' into apm-package-for-serverless
kyungeunni Oct 12, 2023
7e52428
chore: go mod tidy
kyungeunni Oct 12, 2023
33dc876
chore: fix field def
kyungeunni Oct 24, 2023
08bb637
Merge branch 'main' into apm-package-for-serverless
kyungeunni Oct 24, 2023
7e976ac
chore: move dynamcic fileds to fileds.yml
kyungeunni Oct 24, 2023
8154d2a
fix: work around for labels, but still broken numeric_labels
kyungeunni Oct 24, 2023
5fc2524
Merge branch 'main' into apm-package-for-serverless
kyungeunni Nov 6, 2023
17d10b1
chore: revert labels definition
kyungeunni Nov 6, 2023
da7a54b
chore: use [email protected]
kyungeunni Nov 6, 2023
6c024e2
chore: use ecs labels thanks to the fix in fleet
kyungeunni Nov 6, 2023
d6e6ecf
chore: make lint happy
kyungeunni Nov 6, 2023
3507c59
chore: update package-spec version to 3.0.1
kyungeunni Nov 10, 2023
b45c421
Merge branch 'main' into apm-package-for-serverless
kyungeunni Nov 14, 2023
447d40f
Merge branch 'main' into apm-package-for-serverless
kyungeunni Dec 8, 2023
4de351a
feat: use latest elastic-package
kyungeunni Dec 8, 2023
b8ed9de
chore: go mod tidy
kyungeunni Dec 8, 2023
aa6115b
Merge branch 'main' into apm-package-for-serverless
kyungeunni Dec 29, 2023
9c2e6cf
Merge branch 'main' into apm-package-for-serverless
kyungeunni Jan 3, 2024
7215d40
chore: address comments
kyungeunni Jan 3, 2024
2bfa8f7
Merge branch 'main' into apm-package-for-serverless
carsonip Jan 3, 2024
f68b622
Update apmpackage/apm/changelog.yml
kyungeunni Jan 4, 2024
e0b58ac
Merge branch 'main' into apm-package-for-serverless
kyungeunni Jan 4, 2024
badaa81
Merge branch 'main' into apm-package-for-serverless
kyungeunni Jan 11, 2024
88c0d91
Merge branch 'main' into apm-package-for-serverless
kyungeunni Jan 12, 2024
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
4 changes: 2 additions & 2 deletions apmpackage/apm/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
- version: generated
changes:
- description: Placeholder
- description: Migrate to package-spec v3
type: enhancement
link: https://github.com/elastic/apm-server/pull/123
link: https://github.com/elastic/apm-server/pull/11822
- version: 8.12.0
changes:
- description: Add missing mappings for various fields
Expand Down
4 changes: 4 additions & 0 deletions apmpackage/apm/data_stream/app_logs/fields/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
The way the agent is installed / used.
- name: http.request.headers
type: object
object_type: keyword
description: |
The canonical headers of the monitored HTTP request.
- name: http.response.finished
Expand All @@ -13,6 +14,7 @@
Used by the Node agent to indicate when in the response life cycle an error has occurred.
- name: http.response.headers
type: object
object_type: keyword
description: |
The canonical headers of the monitored HTTP response.
- name: kubernetes.namespace
Expand Down Expand Up @@ -94,6 +96,8 @@
The lambda function version.
- name: numeric_labels
type: object
object_type: scaled_float
dynamic: true
scaling_factor: 1000000
description: |
Custom key/value pairs. Can be used to add meta information to events. Should not contain nested objects. All values are stored as scaled_float.
6 changes: 0 additions & 6 deletions apmpackage/apm/data_stream/app_logs/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,3 @@ elasticsearch:
# ad-hoc searches on HTTP request headers without incurring storage cost
# for users who do not need this capability.
dynamic: false
dynamic_templates:
- numeric_labels:
path_match: numeric_labels.*
mapping:
type: scaled_float
scaling_factor: 1000000
2 changes: 2 additions & 0 deletions apmpackage/apm/data_stream/app_metrics/fields/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@
Version of the runtime used.
- name: numeric_labels
type: object
object_type: scaled_float
dynamic: true
scaling_factor: 1000000
description: |
Custom key/value pairs. Can be used to add meta information to events. Should not contain nested objects. All values are stored as scaled_float.
12 changes: 3 additions & 9 deletions apmpackage/apm/data_stream/app_metrics/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,15 @@ elasticsearch:
# Ensures agents have permissions to write data to `metrics-*-*`
dynamic_dataset: true
dynamic_namespace: true
# Individual measurements are typically uninteresting, so
# use synthetic source to reduce storage size.
source_mode: synthetic
index_template:
mappings:
# Application metrics must be dynamically mapped,
# as their names are application-specific and not
# known ahead of time.
dynamic: true
# Individual measurements are typically uninteresting, so
# use synthetic source to reduce storage size.
_source:
mode: synthetic
# Install dynamic templates for use in dynamically
# mapping complex application metrics.
dynamic_templates:
Expand All @@ -34,8 +33,3 @@ elasticsearch:
mapping:
type: double
index: false
- numeric_labels:
path_match: numeric_labels.*
mapping:
type: scaled_float
scaling_factor: 1000000
6 changes: 6 additions & 0 deletions apmpackage/apm/data_stream/error_logs/fields/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,19 @@
The original body of the monitored HTTP request.
- name: http.request.env
type: object
object_type: keyword
dynamic: true
description: |
The CGI-like environment variables of the monitored HTTP request.
- name: http.request.cookies
type: object
object_type: keyword
dynamic: true
description: |
The cookies of the monitored HTTP request.
- name: http.request.headers
type: object
object_type: keyword
dynamic: true
description: |
The canonical headers of the monitored HTTP request.
Expand All @@ -81,6 +84,7 @@
Used by the Node agent to indicate when in the response life cycle an error has occurred.
- name: http.response.headers
type: object
object_type: keyword
dynamic: true
description: |
The canonical headers of the monitored HTTP response.
Expand Down Expand Up @@ -187,6 +191,8 @@
Keyword of specific relevance in the service's domain (eg. 'request', 'backgroundjob', etc)
- name: numeric_labels
type: object
object_type: scaled_float
dynamic: true
scaling_factor: 1000000
description: |
Custom key/value pairs. Can be used to add meta information to events. Should not contain nested objects. All values are stored as scaled_float.
6 changes: 0 additions & 6 deletions apmpackage/apm/data_stream/error_logs/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,3 @@ elasticsearch:
# ad-hoc searches on HTTP request headers without incurring storage cost
# for users who do not need this capability.
dynamic: false
dynamic_templates:
- numeric_labels:
path_match: numeric_labels.*
mapping:
type: scaled_float
scaling_factor: 1000000
14 changes: 14 additions & 0 deletions apmpackage/apm/data_stream/internal_metrics/fields/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,20 @@
Keyword of specific relevance in the service's domain (eg. 'request', 'backgroundjob', etc)
- name: numeric_labels
type: object
object_type: scaled_float
dynamic: true
scaling_factor: 1000000
description: |
Custom key/value pairs. Can be used to add meta information to events. Should not contain nested objects. All values are stored as scaled_float.
- name: transaction.duration.summary
type: aggregate_metric_double
metrics: ["sum", "value_count"]
default_metric: "sum"
description: |
Total duration of transactions. This field is used for efficient average aggregation on the field
- name: event.success_count
type: aggregate_metric_double
metrics: ["sum", "value_count"]
default_metric: "sum"
description: |
Transaction success counts. This field is used for efficient average aggregation on the field
31 changes: 6 additions & 25 deletions apmpackage/apm/data_stream/internal_metrics/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,16 @@ dataset: apm.internal
ilm_policy: metrics-apm.internal_metrics-default_policy
elasticsearch:
dynamic_namespace: true
# Individual measurements are typically uninteresting, so
# use synthetic source to reduce storage size.
source_mode: synthetic
index_template:
mappings:
# We are in full control of the field names,
# but do not block ingestion on unexpected fields.
dynamic: runtime
# Individual measurements are typically uninteresting, so
# use synthetic source to reduce storage size.
_source:
mode: synthetic
# We map transaction.duration.summary here because aggregate_metric_double
# is not currently supported by package-spec.
#
# See https://github.com/elastic/package-spec/issues/363
properties:
transaction:
properties:
duration:
properties:
summary:
type: aggregate_metric_double
metrics: [sum, value_count]
default_metric: sum
event:
properties:
success_count:
type: aggregate_metric_double
metrics: [sum, value_count]
default_metric: sum
settings:
index:
sort.field: "@timestamp"
sort.order: desc
sort:
field: "@timestamp"
order: desc
6 changes: 0 additions & 6 deletions apmpackage/apm/data_stream/rum_traces/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,3 @@ elasticsearch:
# ad-hoc searches on HTTP request headers without incurring storage cost
# for users who do not need this capability.
dynamic: false
dynamic_templates:
- numeric_labels:
path_match: numeric_labels.*
mapping:
type: scaled_float
scaling_factor: 1000000
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
name: agent.name
- external: ecs
name: event.outcome
- external: ecs
name: labels
dynamic: true
- external: ecs
name: observer.hostname
- external: ecs
Expand All @@ -14,6 +17,3 @@
name: service.environment
- external: ecs
name: service.name
- external: ecs
name: labels
dynamic: true
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
unit: micros
- name: numeric_labels
type: object
object_type: scaled_float
dynamic: true
scaling_factor: 1000000
description: |
Custom key/value pairs. Can be used to add meta information to events. Should not contain nested objects. All values are stored as scaled_float.
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ dataset: apm.service_destination.{{ .Interval }}
ilm_policy: metrics-apm.service_destination_{{ .Interval }}_metrics-default_policy
elasticsearch:
dynamic_namespace: true
# Individual measurements are typically uninteresting, so
# use synthetic source to reduce storage size.
source_mode: synthetic
index_template:
mappings:
# We are in full control of the field names,
# but do not block ingestion on unexpected fields.
dynamic: runtime
# Individual measurements are typically uninteresting, so
# use synthetic source to reduce storage size.
_source:
mode: synthetic
settings:
index:
sort.field: "@timestamp"
sort.order: desc
sort:
field: "@timestamp"
order: desc
data_stream:
hidden: {{ .Hidden }}
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
- external: ecs
name: agent.name
- external: ecs
name: labels
dynamic: true
- external: ecs
name: observer.hostname
- external: ecs
Expand All @@ -12,6 +15,3 @@
name: service.environment
- external: ecs
name: service.name
- external: ecs
name: labels
dynamic: true
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
Name of the programming language used.
- name: numeric_labels
type: object
object_type: scaled_float
dynamic: true
description: |
Custom key/value pairs. Can be used to add meta information to events. Should not contain nested objects. All values are stored as scaled_float.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ elasticsearch:
# We are in full control of the field names,
# but do not block ingestion on unexpected fields.
dynamic: runtime
# Individual measurements are typically uninteresting, so
# use synthetic source to reduce storage size.
_source:
mode: synthetic
settings:
index:
sort.field: "@timestamp"
sort.order: desc
sort:
field: "@timestamp"
order: desc
data_stream:
hidden: {{ .Hidden }}
# Individual measurements are typically uninteresting, so
# use synthetic source to reduce storage size.
source_mode: synthetic
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
- external: ecs
name: agent.name
- external: ecs
name: labels
dynamic: true
- external: ecs
name: observer.hostname
- external: ecs
Expand All @@ -12,6 +15,3 @@
name: service.environment
- external: ecs
name: service.name
- external: ecs
name: labels
dynamic: true
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,22 @@
Pre-aggregated histogram of transaction durations.
- name: numeric_labels
type: object
object_type: scaled_float
dynamic: true
description: |
Custom key/value pairs. Can be used to add meta information to events. Should not contain nested objects. All values are stored as scaled_float.
- name: service_transaction.aggregation.overflow_count
type: long
description: Number of aggregation groups that overflowed for service transaction metrics aggregation.
- name: transaction.duration.summary
type: aggregate_metric_double
metrics: ["sum", "value_count"]
default_metric: "sum"
description: |
Total duration of transactions. This can be used to efficiently aggregate the average duration
- name: event.success_count
type: aggregate_metric_double
metrics: ["sum", "value_count"]
default_metric: "sum"
description: |
Transaction success counts. This field is used for efficient average aggregation on the field
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,18 @@ dataset: apm.service_transaction.{{ .Interval }}
ilm_policy: metrics-apm.service_transaction_{{ .Interval }}_metrics-default_policy
elasticsearch:
dynamic_namespace: true
# Individual measurements are typically uninteresting, so
# use synthetic source to reduce storage size.
source_mode: synthetic
index_template:
mappings:
# We are in full control of the field names,
# but do not block ingestion on unexpected fields.
dynamic: runtime
# Individual measurements are typically uninteresting, so
# use synthetic source to reduce storage size.
_source:
mode: synthetic
# We map transaction.duration.summary here because aggregate_metric_double
# is not currently supported by package-spec.
#
# See https://github.com/elastic/package-spec/issues/363
properties:
transaction:
properties:
duration:
properties:
summary:
type: aggregate_metric_double
metrics: [sum, value_count]
default_metric: sum
event:
properties:
success_count:
type: aggregate_metric_double
metrics: [sum, value_count]
default_metric: sum
settings:
index:
sort.field: "@timestamp"
sort.order: desc
sort:
field: "@timestamp"
order: desc
data_stream:
hidden: {{ .Hidden }}
Loading