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

K8s annotation discovery blogpost #5967

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

ChrsMark
Copy link
Member

@ChrsMark ChrsMark commented Jan 17, 2025

This PR adds a blog post about the new functionality of the Opentelemetry Collector which was introduced with open-telemetry/opentelemetry-collector-contrib#34427.

With this new feature now the Collector provides support for dynamic workload discovery based on Kubernetes Pods's annotations.

Preview: https://deploy-preview-5967--opentelemetry.netlify.app/blog/2025/otel-collector-k8s-discovery/

/cc @dmitryax

@ChrsMark ChrsMark requested a review from a team as a code owner January 17, 2025 19:23
@opentelemetrybot opentelemetrybot requested a review from a team January 17, 2025 19:23
@github-actions github-actions bot added the blog label Jan 17, 2025
@ChrsMark ChrsMark force-pushed the add_k8s_discovery_blogpost branch 5 times, most recently from e8de438 to f6215ae Compare January 17, 2025 19:39
@ChrsMark
Copy link
Member Author

FYI @open-telemetry/docs-maintainers sth is odd with the 2025 index page and I cannot find the preview page that is built. I assume it's because there is no prior blog post for 2025 and something is missing there but not sure what.

Copy link
Member

@svrnm svrnm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A first pass! This is a really great feature I was not aware coming, so great to have a blog post.

Note: we should also think about turning some of that into documentation immediatly otherwise this gets dated and people will refer to it as docs, would you be able to provide that as well? Could be a very basic page with an example to begin with

author: >
[Dmitrii Anoshin](https://github.com/dmitryax) (Cisco/Splunk), [Christos
Markou](https://github.com/ChrsMark) (Elastic)
cSpell:ignore: Dmitrii Anoshin Markou
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cSpell:ignore: Dmitrii Anoshin Markou
sig: Collector
issue: opentelemetry-collector-contrib#34427
cSpell:ignore: Dmitrii Anoshin Markou

We ask SIG members as well to make sure that their blog posts are sponsored, I assume that the Collector SIG has agreed to publish this and is going to review, so I will not ask you to raise an additional issue, but please add these annotations (see https://opentelemetry.io/docs/contributing/blog/ for more details)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah good to know. I will also share it with the Collector SIG to check if there is any objection/feedback from the wider group.

cSpell:ignore: Dmitrii Anoshin Markou
---

In the world of containers and Kubernetes, observability is crucial. Users need
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In the world of containers and Kubernetes, observability is crucial. Users need
In the world of containers and [Kubernetes](https://kubernetes.io/), observability is crucial. Users need

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

that makes dynamic workload discovery even easier, providing a seamless
experience for both administrators and users.

## What is Autodiscovery in Observability?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## What is Autodiscovery in Observability?
## Automatic discovery for containers and pods

Is "Autodiscovery" a specific term for this technique, or is this section explaining how auto discovery works? The text does not give any hint on "what" but provides a "how"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

## What is Autodiscovery in Observability?

Applications running on containers and pods become moving targets for the
monitoring system. With autodiscovery, monitoring agents like the Collector can
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
monitoring system. With autodiscovery, monitoring agents like the Collector can
monitoring system. With automatic discovery, monitoring agents like the Collector can

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

```

The above configuration will be enabled when a pod is discovered via the
Kubernetes API that exposes port 6379 (the known port for Redis).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Kubernetes API that exposes port 6379 (the known port for Redis).
Kubernetes API that exposes port `6379` (the known port for Redis).

configuration "templates" that rely on environment conditions. For example, as
an observability engineer, I can configure my Collector to enable the
[Redis receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.117.0/receiver/redisreceiver)
when a Redis pod is deployed on the cluster. The following configuration can
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe I am very pedantic here, but since Redis is no longer open source, wouldn't it be better to pick something wie an OSI-approved open source license for the example?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can use NGINX which is our example further down as well.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, that would be great!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@ChrsMark ChrsMark force-pushed the add_k8s_discovery_blogpost branch from f6215ae to 3183ec2 Compare January 20, 2025 10:21
@opentelemetrybot opentelemetrybot requested a review from a team January 20, 2025 10:21
@ChrsMark ChrsMark force-pushed the add_k8s_discovery_blogpost branch 3 times, most recently from 3763d98 to d6bcd8c Compare January 20, 2025 11:55
@ChrsMark
Copy link
Member Author

A first pass! This is a really great feature I was not aware coming, so great to have a blog post.

Note: we should also think about turning some of that into documentation immediatly otherwise this gets dated and people will refer to it as docs, would you be able to provide that as well? Could be a very basic page with an example to begin with

Thank's for reviewing @svrnm! About turning this into documentation: I linked the last paragraph to the perspective documentation of that feature in the Collector: https://github.com/open-telemetry/opentelemetry.io/pull/5967/files#diff-4fa372b70b4ce1ad702b596ad6f06decb547f6de4dd4ca979ffeee2bac298f72R182. Would we need more than this?

@svrnm
Copy link
Member

svrnm commented Jan 20, 2025

A first pass! This is a really great feature I was not aware coming, so great to have a blog post.
Note: we should also think about turning some of that into documentation immediatly otherwise this gets dated and people will refer to it as docs, would you be able to provide that as well? Could be a very basic page with an example to begin with

Thank's for reviewing @svrnm! About turning this into documentation: I linked the last paragraph to the perspective documentation of that feature in the Collector: #5967 (files). Would we need more than this?

I mean adding a section/page somewhere in https://opentelemetry.io/docs/collector/

@ChrsMark
Copy link
Member Author

I mean adding a section/page somewhere in https://opentelemetry.io/docs/collector/

My only concern would be that we would need to maintain that source in addition to receiver's README, right?
If we find value in doing this I'm fine filing an issue and assigning it to me.

Copy link
Member

@andrzej-stencel andrzej-stencel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me 🚀 Just a couple nits/typos. with the caveats that I'm not a native English speaker, so my suggestions might be incorrect. Feel free to discard them.

@ChrsMark ChrsMark force-pushed the add_k8s_discovery_blogpost branch 2 times, most recently from 854f6a1 to f6a43c2 Compare January 22, 2025 09:22
Copy link
Contributor

@chalin chalin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some initial comments.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there is only this one file, then rename this to content/en/blog/2025/otel-collector-k8s-discovery.md.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! Done.

content/en/blog/2025/otel-collector-k8s-discovery/index.md Outdated Show resolved Hide resolved
content/en/blog/2025/otel-collector-k8s-discovery/index.md Outdated Show resolved Hide resolved
content/en/blog/2025/otel-collector-k8s-discovery/index.md Outdated Show resolved Hide resolved
content/en/blog/2025/otel-collector-k8s-discovery/index.md Outdated Show resolved Hide resolved
content/en/blog/2025/otel-collector-k8s-discovery/index.md Outdated Show resolved Hide resolved
@opentelemetrybot opentelemetrybot requested a review from a team January 23, 2025 00:31
@chalin chalin changed the title [Opentelemetry Collector] Add k8s annotation discovery blogpost K8s annotation discovery blogpost Jan 23, 2025
@chalin
Copy link
Contributor

chalin commented Jan 23, 2025

@chalin chalin force-pushed the add_k8s_discovery_blogpost branch from 67993ab to 0eb852e Compare January 23, 2025 00:34
@opentelemetrybot opentelemetrybot requested a review from a team January 23, 2025 00:34
@chalin
Copy link
Contributor

chalin commented Jan 23, 2025

/fix:all

@opentelemetrybot
Copy link
Collaborator

You triggered fix:all action run at https://github.com/open-telemetry/opentelemetry.io/actions/runs/12919783314

@opentelemetrybot
Copy link
Collaborator

fix:all was successful.

IMPORTANT: (RE-)RUN /fix:all to ensure that there are no remaining check issues.

@chalin chalin force-pushed the add_k8s_discovery_blogpost branch from 187d487 to ef477e5 Compare January 23, 2025 02:05
static/refcache.json Outdated Show resolved Hide resolved
@opentelemetrybot opentelemetrybot requested a review from a team January 23, 2025 08:26
@ChrsMark ChrsMark force-pushed the add_k8s_discovery_blogpost branch from 9608188 to 99b4e01 Compare January 23, 2025 08:33
Signed-off-by: ChrsMark <[email protected]>
Signed-off-by: ChrsMark <[email protected]>
@ChrsMark ChrsMark force-pushed the add_k8s_discovery_blogpost branch from 623fb64 to 3018504 Compare January 23, 2025 08:58
@ChrsMark ChrsMark requested review from chalin and svrnm January 23, 2025 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

5 participants