-
Notifications
You must be signed in to change notification settings - Fork 456
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
[AWS Farget] Set dimension fields #6733
Conversation
Signed-off-by: constanca-m <constanca.manteigas@elastic.co>
Signed-off-by: constanca-m <constanca.manteigas@elastic.co>
🌐 Coverage report
|
Signed-off-by: constanca-m <constanca.manteigas@elastic.co>
packages/awsfargate/changelog.yml
Outdated
@@ -1,4 +1,9 @@ | |||
# newer versions go on top | |||
- version: 0.2.2 | |||
changes: | |||
- description: Set dimension fields. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sets dimension fields, but also agent.id
. Should we mention it here?
- description: Set dimension fields. | |
- description: Set `dimension`, and `agent.id` fields. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agent.id
was already present, but this time, it is just explicitly set on the ecs.yml
. I can add that. What do you think is best @dmathieu?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mentioning that it's now explicitly set sounds good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @dmathieu , I updated the changelog to include that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- why
cloud.account.id
andregion
are not set as a dimensions?integrations/packages/awsfargate/data_stream/task_stats/sample_event.json
Lines 136 to 138 in f2e2ac4
"cloud": { "region": "us-west-2" }, - can there be multiple clusters
"cluster_name": "default",
@@ -33,6 +33,7 @@ | |||
name: container.id | |||
- external: ecs | |||
name: container.name | |||
dimension: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wondering if awsfargate.task_stats.task_name
isn't a better option for this
"task_name": "query-metadata" |
so to rely not on the container name (in case there will be some changes in name generation), but the task name instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mention it on the description: The structure for that field is: arn:aws:ecs:<region>:<account-id>:task/<cluster-name>/<task-id>
, that is why those fields are not set as dimension, because they are included in this field.
Signed-off-by: constanca-m <constanca.manteigas@elastic.co>
Package awsfargate - 0.2.3 containing this change is available at https://epr.elastic.co/search?package=awsfargate |
What does this PR do?
Set dimension fields for TSDB migration.
Details
ECS dimensions: The rationale for the defined ECS dimensions can be found here. The fields for this specific data stream would be:
agent.id
cloud.account.id
cloud.region
For the specific fields, we would need these three:
awsfargate.task_stats.cluster_name
awsfargate.task_stats.identifier
: each task is uniquely identified by the ID within a clustercontainer.name
is added as dimension in case there is more than one container in a task.Since ECS has a field that clusters four of them (
account.id
andregion
,cluster_name
andidentifier
),container.labels.com_amazonaws_ecs_task-arn
, we set that one as dimension instead of all four. The structure for that field is:arn:aws:ecs:<region>:<account-id>:task/<cluster-name>/<task-id>
.Checklist
changelog.yml
file.Related issues
Relates to #6732.