-
Notifications
You must be signed in to change notification settings - Fork 29
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
Feature Request: Expose OpenTelemetry Collector configuration #208
Comments
Thanks for this. It is a consideration moving forward definitely |
@denniszielke, have you considered OTEL as a side car option? |
@JennyLawrance yes that is what we are doing today but on the long run this does not scale (we need to maintain the same config , we need to make sure every dev creates the right config for each microservice and this is not what a PaaS should enforce). Also the performance overhead is significant as long ACA is limited to 4GB per replica (app+sidecar) |
Adding onto this (& tagging @agoncal as well) - If I wanted to run an OTel collector instance as its own containerapp its currently very difficult to inject the configuration, since ContainerApps does not expose a For example, if I wanted to run the Otel collector on kubernetes, I could just deploy this: apiVersion: v1
kind: ConfigMap
metadata:
name: otel-collector-config
labels:
app: otel-collector
role: monitoring
data:
otel-collector-config.yml: |2
receivers:
otlp:
protocols:
grpc:
exporters:
jaeger:
endpoint: jaeger:14250
tls:
insecure: true
processors:
batch:
extensions:
health_check:
service:
extensions:
- health_check
pipelines:
traces:
receivers:
- otlp
processors:
- batch
exporters:
- jaeger
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: otel-collector
labels:
name: otel-collector
app: otel-collector
role: monitoring
app.kubernetes.io/part-of: monitoring
spec:
replicas: 1
selector:
matchLabels:
name: otel-collector
template:
metadata:
labels:
name: otel-collector
app: otel-collector
role: monitoring
spec:
containers:
- image: otel/opentelemetry-collector:0.53.0
name: otel-collector
args:
- "--config=/conf/otel-collector-config.yml"
ports:
- name: health-check
containerPort: 13133
- name: otlp-receiver
containerPort: 4317
volumeMounts:
- name: otel-collector-config
mountPath: /conf
volumes:
- name: otel-collector-config
configMap:
name: otel-collector-config I haven't yet found a good way to do this in Azure ContainerApps. I found https://docs.microsoft.com/en-us/azure/container-apps/storage-mounts?pivots=aca-cli#azure-files but that means I have to maintain a separate yaml file specific to azure containerapps, which contains most of the same fields as a kubernetes yaml. That doesn't seem like a scalable solution, especially if all my CI/CD automation uses the |
This approach works https://www.honeycomb.io/blog/opentelemetry-collector-azure-container-apps |
hey @alhardy I followed that guide, it works, but the effort to do it is huge and needs manual intervention ( downloading config and editing ). I even needed to do 'more' and detailed it here https://blog.depechie.com/posts/2022-10-13-opentelemetry-on-azure-container-apps/ |
Thank you @alhardy ! That still seems way more complicated than it should! |
Agree. |
I found out that if you do not use the Example part of the
|
I'm looking for some assistance. I started with the Honeycomb article to build a collector in an Azure Container App and it wasn't starting correctly until I found this post, pointing to the second article and added the args section to point to my mounted config file. The collector is running and listening for otlp http traffic on port 4318 with the ingress set to allow external traffic. However, I cannot get it to receive any data from my .Net Core 7 api. I can get it all working on my laptop with the otel collector contrib running in docker desktop set for http on port 4318. Here is the config file for the container:
The log stream on the container shows that it has started successfully giving this output:
The code I am using for the otlp exporter in my .Net Core 7 project to hit the container app is as follows:
I have tried running the project locally on my laptop and also have the api in it's own container with an APIM in place to test the endpoints. I can see in the console logs that the Writeline is output when starting up the container and that telemetry is being sent to the Console through the Console Exporter. However, it is not being received by the collector. EDIT: I sorted the issue. At present Azure Container Apps only open one port, so you cannot map multiple ports like you can with Docker. Port 80 and 443 are open by default and I thought 4318 had successfully been opened as it says it's available in the Container overview. I used Telnet to confirm which ports were open and found 4318 was not available, so I tried sending the data to port 443 and it worked. My new endpoint is:
|
Is your feature request related to a problem? Please describe.
I want to use my own observability solution and not azure monitor. To connect I need the ability to configure my own otel processors and exporters.
Describe the solution you'd like.
I would like the ability to configure receivers, processors, (extensions?), the sampling rate and exporters.
Describe alternatives you've considered.
The alternative would be to run my own otel collector as ACA service and manually change all other ACA apps to use them. This does not seem like a scalable good idea.
Additional context.
The text was updated successfully, but these errors were encountered: