-
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
example: add kubernetes logs example #2606
example: add kubernetes logs example #2606
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2606 +/- ##
==========================================
- Coverage 91.37% 91.35% -0.02%
==========================================
Files 431 431
Lines 21461 21461
==========================================
- Hits 19609 19605 -4
- Misses 1387 1390 +3
- Partials 465 466 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
fd61823
to
a7fbb60
Compare
I messed up sth with rebasing |
8e09454
to
c2c6989
Compare
k8s.container.name: 'EXPR($.container_name)' | ||
k8s.namespace.name: 'EXPR($.namespace)' | ||
k8s.pod.name: 'EXPR($.pod_name)' | ||
run_id: 'EXPR($.run_id)' |
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.
What is run_id
? Is it something that requires a semantic convention in Otel spec?
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'm not sure if its really needed. It defines from which run of a pod logs are coming. In case pod is restarted the run_id is incremented. It could be sth like k8s.container.run_number
, k8s.container.run_id
Even more like container.*
as specified in semantic conventions
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.
Can you please create an issue for this and for stream
and add to Basic Logs milestone in this repo so that we can decide what to do about it.
# Move out attributes to Attributes | ||
- type: metadata | ||
attributes: | ||
stream: 'EXPR($.stream)' |
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.
Do we need to keep stream
as an attribute? It seems like is it only marginally useful. If we want to have it we need to come up with some idea for a semantic convention. Otel spec spec does not encourage attribute names like that: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/attribute-and-label-naming.md#recommendations-for-opentelemetry-authors
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.
Is there any semantic convention for file_path
, file_name
and so on? I think stream
should be added there. I consider it rather important. As end user I would like to be able to manage logs differently depending on a stream type
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.
No, I don't think we have semantic conventions like that. Can you please open an issue here in this repo to decide what we want to do with this attribute and we can address it in a future PR.
@sumo-drosiek we can merge this example as is and work on improvements later. If you prefer this approach please create new issues for each unresolved comment and I will merge the PR. |
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com> Co-authored-by: Patryk Małek <69143962+pmalek-sumo@users.noreply.github.com>
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
c2c6989
to
4f577dc
Compare
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
4f577dc
to
21c5fb8
Compare
I added daemonest configuration in another commit, and created |
k8s.container.name: 'EXPR($.container_name)' | ||
k8s.namespace.name: 'EXPR($.namespace)' | ||
k8s.pod.name: 'EXPR($.pod_name)' | ||
run_id: 'EXPR($.run_id)' |
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.
Can you please create an issue for this and for stream
and add to Basic Logs milestone in this repo so that we can decide what to do about it.
@sumo-drosiek I left a couple more comments to do some final touches and we can merge it. This is great. |
…logs Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
481d59a
to
b85326c
Compare
@sumo-drosiek please create issues to decide what we do with This PR looks good, I will merge it now. Thanks. |
@tigrannajaryan I already created issue: #2628 |
* add env support for otel_span configuration Signed-off-by: Cuichen Li <cuichli@cisco.com> * update changelog * update changelog and some logic based on comment * Update CHANGELOG.md Co-authored-by: Anthony Mirabella <a9@aneurysm9.com> * add document about retrieve value from environment variable Signed-off-by: Cuichen Li <cuichli@cisco.com> * remove trailing whitespace Signed-off-by: Cuichen Li <cuichli@cisco.com> * parse environment variable before apply the options * Update CHANGELOG.md Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com> * Update sdk/trace/provider_test.go Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com> * Update CHANGELOG.md Co-authored-by: Anthony Mirabella <a9@aneurysm9.com> Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Description:
This PR adds example configuration to handle kubernetes container logs using filelog receiver
This depends on the #2564
Link to tracking Issue:
#2266
Testing:
N/A
tests which were performed to get results are going to be issued in another PR
Documentation:
README.md