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

style: inject ingestor url (otel config file) + aggregator/go-parser url (ingestor config file) through env vars #241

Merged
merged 4 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/sweet-moose-explain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@hyperdx/api': patch
'@hyperdx/app': patch
---

style: inject ingestor url (otel config file) + aggregator/go-parser url
(ingestor config file) through env vars
3 changes: 3 additions & 0 deletions docker-compose.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ services:
- 8002:8002 # http-generic
- 8686:8686 # healthcheck
environment:
AGGREGATOR_API_URL: 'http://aggregator:8001'
ENABLE_GO_PARSER: 'false'
GO_PARSER_API_URL: 'http://go-parser:7777'
RUST_BACKTRACE: full
VECTOR_LOG: ${HYPERDX_LOG_LEVEL}
VECTOR_OPENSSL_LEGACY_PROVIDER: 'false'
Expand All @@ -25,6 +27,7 @@ services:
environment:
HYPERDX_API_KEY: ${HYPERDX_API_KEY}
HYPERDX_LOG_LEVEL: ${HYPERDX_LOG_LEVEL}
INGESTOR_API_URL: 'http://ingestor:8002'
volumes:
- ./docker/otel-collector/config.yaml:/etc/otelcol-contrib/config.yaml
ports:
Expand Down
3 changes: 3 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ services:
- 8002:8002 # http-generic
- 8686:8686 # healthcheck
environment:
AGGREGATOR_API_URL: 'http://aggregator:8001'
ENABLE_GO_PARSER: 'false'
GO_PARSER_API_URL: 'http://go-parser:7777'
RUST_BACKTRACE: full
VECTOR_LOG: ${HYPERDX_LOG_LEVEL}
VECTOR_OPENSSL_LEGACY_PROVIDER: 'false'
Expand Down Expand Up @@ -95,6 +97,7 @@ services:
environment:
HYPERDX_API_KEY: ${HYPERDX_API_KEY}
HYPERDX_LOG_LEVEL: ${HYPERDX_LOG_LEVEL}
INGESTOR_API_URL: 'http://ingestor:8002'
volumes:
- ./docker/otel-collector/config.yaml:/etc/otelcol-contrib/config.yaml
ports:
Expand Down
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ services:
- 8002:8002 # http-generic
- 8686:8686 # healthcheck
environment:
AGGREGATOR_API_URL: 'http://aggregator:8001'
ENABLE_GO_PARSER: 'false'
GO_PARSER_API_URL: 'http://go-parser:7777'
RUST_BACKTRACE: full
VECTOR_LOG: ${HYPERDX_LOG_LEVEL}
VECTOR_OPENSSL_LEGACY_PROVIDER: 'false'
Expand Down Expand Up @@ -78,6 +80,7 @@ services:
container_name: hdx-oss-otel-collector
environment:
HYPERDX_LOG_LEVEL: ${HYPERDX_LOG_LEVEL}
INGESTOR_API_URL: 'http://ingestor:8002'
ports:
- '13133:13133' # health_check extension
- '1888:1888' # pprof extension
Expand Down
6 changes: 3 additions & 3 deletions docker/ingestor/http-sinks.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[sinks.go_parser]
type = "http"
uri = "http://go-parser:7777"
uri = "${GO_PARSER_API_URL}"
inputs = ["go_spans"] # only send spans for now
compression = "gzip"
encoding.codec = "json"
Expand All @@ -11,7 +11,7 @@ batch.timeout_secs = 1

[sinks.dev_hdx_aggregator]
type = "http"
uri = "http://aggregator:8001"
uri = "${AGGREGATOR_API_URL}"
inputs = ["post_spans", "post_logs"]
compression = "gzip"
encoding.codec = "json"
Expand All @@ -22,7 +22,7 @@ batch.timeout_secs = 1

[sinks.dev_hdx_metrics_aggregator]
type = "http"
uri = "http://aggregator:8001?telemetry=metric"
uri = "${AGGREGATOR_API_URL}?telemetry=metric"
inputs = ["metrics"]
compression = "gzip"
encoding.codec = "json"
Expand Down
3 changes: 3 additions & 0 deletions docker/ingestor/run_linting.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@

directory="./docker/ingestor"

export AGGREGATOR_API_URL="http://aggregator:8001"
export GO_PARSER_API_URL="http://go-parser:7777"

vector validate --no-environment $directory/*.toml
6 changes: 3 additions & 3 deletions docker/otel-collector/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ exporters:
loglevel: ${env:HYPERDX_LOG_LEVEL}
logzio/traces:
account_token: 'X' # required but we don't use it
endpoint: 'http://ingestor:8002?hdx_platform=otel-traces'
endpoint: '${env:INGESTOR_API_URL}?hdx_platform=otel-traces'
logzio/logs:
account_token: 'X' # required but we don't use it
endpoint: 'http://ingestor:8002?hdx_platform=otel-logs'
endpoint: '${env:INGESTOR_API_URL}?hdx_platform=otel-logs'
# https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/splunkhecexporter
splunk_hec:
token: 'X' # required but we don't use it
# endpoint: 'http://ingestor:8002?hdx_platform=otel-metrics'
endpoint: 'http://ingestor:8002?hdx_platform=otel-metrics'
endpoint: '${env:INGESTOR_API_URL}?hdx_platform=otel-metrics'
# HTTP timeout when sending data. Defaults to 10s.
timeout: 10s
max_content_length_logs: 0
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4994,7 +4994,7 @@
dependencies:
"@types/react" "*"

"@types/react@*", "@types/react@17.0.52", "@types/react@>=16", "@types/react@>=16.9.11", "@types/react@^17", "@types/react@^17.0.52":
"@types/react@*", "@types/react@>=16", "@types/react@>=16.9.11", "@types/react@^17", "@types/react@^17.0.52":
version "17.0.52"
resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.52.tgz#10d8b907b5c563ac014a541f289ae8eaa9bf2e9b"
integrity sha512-vwk8QqVODi0VaZZpDXQCmEmiOuyjEFPY7Ttaw5vjM112LOq37yz1CDJGrRJwA1fYEq4Iitd5rnjd1yWAc/bT+A==
Expand Down
Loading