-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
add EntityState entity event as log record for host #33927
Comments
Pinging code owners: See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Would appreciate @tigrannajaryan review, given you did all the work around Entity events. |
+1 for producing EntityState for the Host. This is our (Entity SIG) intent in the future, Host will be one of the entities we would like to report. As long as this is marked "alpha" since we are not yet certain about what Id and Attributes the host should include. The event's shape looks slightly wrong to me. The "otel.entity.id" should not be contained in "otel.entity.attributes". I think this is what would be expected:
To make this work nicely the resourcedetection processor likely needs to be reworked to gain understanding of entities so that it can put the right attributes in the "otel.entity.id". I have a draft of what it can possibly look like in this prototype: tigrannajaryan#1 |
Thanks for the info @tigrannajaryan, so basically for now something like this can be used:
I put the logs in "development" stability in this #33928, would apprecaite if you could take a look / comment 🙇 I would like to do it in stages, first add capability in hostmetrics receiver, next understand and add the needed changes in resourcedetection processor. What do you think? |
Sounds good to me. Thanks for working on this. I just want to emphasize one more time: we are in the very early stages of designing the entities, so we should expect significant changes as we gain better understanding over time. I think it would be also great for you to attend Entities SIG meetings to both be aware of developments and also help us with any feedback you may have as you work on this. |
… host (#33928) **Description:** Add EntityState event for host, implementation is similiar to k8sclusterreceiver. This change sends empty event, which can be used together with resourcedetection processor to add required attributes: ``` receivers: hostmetrics: enabled: true metadata_collection_interval: "5m" processors: resourcedetection/env: detectors: ["system", "env"] timeout: 2s override: false system: resource_attributes: host.id: enabled: true resourcedetection/region: detectors: ["gcp", "ec2", "azure"] timeout: 2s override: true transform/entity-event: log_statements: - context: log statements: - set(attributes["otel.entity.attributes"]["otel.entity.id"]["host.id"], resource.attributes["host.id"]) - set(attributes["otel.entity.attributes"]["host.name"], resource.attributes["host.name"]) - set(attributes["otel.entity.attributes"]["host.type"], resource.attributes["host.type"]) - set(attributes["otel.entity.attributes"]["host.image.id"], resource.attributes["host.image.id"]) - set(attributes["otel.entity.attributes"]["host.image.name"], resource.attributes["host.image.name"]) - context: resource statements: - keep_keys(attributes, [""]) service: pipelines: logs/entity: exporters: - otlp processors: - k8sattributes - resourcedetection/env - resourcedetection/region - transform/entity-event receivers: - hostmetrics ``` **Link to tracking Issue:** #33927 **Testing:** - kind cluster - unit tests **Documentation:** <Describe the documentation added.> - added docs --------- Co-authored-by: Tigran Najaryan <[email protected]> Co-authored-by: Dmitrii Anoshin <[email protected]>
Component(s)
receiver/hostmetrics
Is your feature request related to a problem? Please describe.
I would like to add EntityState Entity event, similar to what we have in k8s_cluster receiver, when is configured as log consumer. We would send a event on startup and also periodically if
metadata_collection_interval
is configured.This event would be empty, so that resourcedetection processor would fill in the details. Initially transform processor would be also needed to fit the Entity model.
Example pipeline:
Example event we would produce:
Example k8s_cluster_receiver entity event:
Describe the solution you'd like
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: