-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a Dockerfile that can build the collector along with an example. (#…
…256) This makes sure that go tooling isn't required to play with a binary built from master. It works particularly well with docker-compose, where you can set the build context to https://github.com/open-telemetry/opentelemetry-collector-contrib.git and always be testing integrations against master with a single command. **Link to tracking Issue:** fixes #236 **Testing:** docker build / docker run **Documentation:** Added the docker build command to the README
- Loading branch information
Anuraag Agrawal
authored
May 28, 2020
1 parent
9b27241
commit 46c109d
Showing
6 changed files
with
133 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM golang:1.14 AS build | ||
|
||
WORKDIR /src | ||
ADD . /src | ||
|
||
RUN make otelcontribcol | ||
|
||
FROM alpine:latest as certs | ||
RUN apk --update add ca-certificates | ||
|
||
FROM scratch | ||
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt | ||
COPY --from=build /src/bin/otelcontribcol_linux_amd64 /otelcontribcol | ||
ENTRYPOINT ["/otelcontribcol"] | ||
EXPOSE 55680 55679 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# OpenTelemetry Collector Demo | ||
|
||
This demo is a sample app to build the collector and exercise its tracing functionality. | ||
|
||
To build and run the demo, switch to this directory and run | ||
|
||
`docker-compose up` | ||
|
||
Hit `http://localhost:8081` in your browser or using something like cURL, and then open | ||
up `http://localhost:9411` or `http://localhost:16686` to search for the traces in the | ||
Zipkin or Jaeger UIs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
version: "3" | ||
services: | ||
# Jaeger | ||
jaeger: | ||
image: jaegertracing/all-in-one:latest | ||
ports: | ||
- "16686:16686" | ||
- "14268" | ||
- "14250" | ||
|
||
#Zipkin | ||
zipkin: | ||
image: openzipkin/zipkin | ||
container_name: zipkin | ||
ports: | ||
- 9411:9411 | ||
|
||
otel-collector: | ||
build: | ||
context: ../.. | ||
dockerfile: examples/tracing/Dockerfile | ||
command: ["--config=/etc/otel-collector-config.yml"] | ||
volumes: | ||
- ./otel-collector-config.yml:/etc/otel-collector-config.yml | ||
ports: | ||
- "1888:1888" # pprof extension | ||
- "8888:8888" # Prometheus metrics exposed by the collector | ||
- "8889:8889" # Prometheus exporter metrics | ||
- "13133:13133" # health_check extension | ||
- "9411" # Zipkin receiver | ||
- "55680:55679" # zpages extension | ||
depends_on: | ||
- jaeger | ||
- zipkin | ||
|
||
# Expose the frontend on http://localhost:8081 | ||
frontend: | ||
image: openzipkin/example-sleuth-webmvc | ||
command: Frontend | ||
environment: | ||
JAVA_OPTS: -Dspring.zipkin.baseUrl=http://otel-collector:9411 | ||
ports: | ||
- 8081:8081 | ||
depends_on: | ||
- otel-collector | ||
|
||
# Expose the backend on http://localhost:9000 | ||
backend: | ||
image: openzipkin/example-sleuth-webmvc | ||
command: Backend | ||
environment: | ||
JAVA_OPTS: -Dspring.zipkin.baseUrl=http://otel-collector:9411 | ||
ports: | ||
- 9000:9000 | ||
depends_on: | ||
- otel-collector |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
receivers: | ||
otlp: | ||
endpoint: 0.0.0.0:55680 | ||
zipkin: | ||
endpoint: 0.0.0.0:9411 | ||
|
||
exporters: | ||
logging: | ||
|
||
zipkin: | ||
url: "http://zipkin:9411/api/v2/spans" | ||
format: proto | ||
|
||
jaeger_thrift: | ||
url: "http://jaeger:14268/api/traces" | ||
|
||
processors: | ||
batch: | ||
queued_retry: | ||
|
||
extensions: | ||
health_check: | ||
pprof: | ||
endpoint: :1888 | ||
zpages: | ||
endpoint: :55679 | ||
|
||
service: | ||
extensions: [pprof, zpages, health_check] | ||
pipelines: | ||
traces: | ||
receivers: [otlp, zipkin] | ||
exporters: [zipkin, jaeger_thrift, logging] | ||
processors: [batch, queued_retry] |