From a6d08673f6d4074e8928fb2b86b8dd7da11fd77f Mon Sep 17 00:00:00 2001 From: Denise Li Date: Mon, 15 Jul 2024 14:39:16 -0400 Subject: [PATCH 1/3] init --- Justfile | 10 +++++++--- text.txt | 27 +++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 text.txt diff --git a/Justfile b/Justfile index 056fe634a0..a0362dbe93 100644 --- a/Justfile +++ b/Justfile @@ -204,10 +204,14 @@ otel-ui: # `just otel-dev` with any args you would pass to `ftl dev`. To stop the otel stream, run # `just otel-stop` in a third terminal tab. otel-stream: + #!/bin/bash + + grpcPort=$(cat docker-compose.yml | grep "OTLP gRPC" | sed 's/:.*//' | sed -r 's/ +- //') docker run \ -p {{otelGrpcPort}}:{{otelGrpcPort}} \ -p 55679:55679 \ - otel/opentelemetry-collector:0.104.0 + otel/opentelemetry-collector:0.104.0 | sed 's/\([A-Z].* \)/\ + \1/g' # Stop the docker container running otel. otelContainerID := `docker ps -f ancestor=otel/opentelemetry-collector:0.104.0 | tail -1 | cut -d " " -f1` @@ -218,6 +222,6 @@ otel-stop: otel-dev *args: #!/bin/bash - gprcPort=$(cat docker-compose.yml | grep "OTLP gRPC" | sed 's/:.*//' | sed -r 's/ +- //') - export OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:${gprcPort}" + grpcPort=$(cat docker-compose.yml | grep "OTLP gRPC" | sed 's/:.*//' | sed -r 's/ +- //') + export OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:${grpcPort}" ftl dev {{args}} diff --git a/text.txt b/text.txt new file mode 100644 index 0000000000..33f27e06fa --- /dev/null +++ b/text.txt @@ -0,0 +1,27 @@ +StartTimestamp: 2024-07-15 18:35:28.374 +0000 UTC +Timestamp: 2024-07-15 18:36:08.374 +0000 UTC +Value: 18720272.000000 +Metric #16 +Descriptor: + -> Name: otelcol_process_runtime_total_sys_memory_bytes + -> Description: Total bytes of memory obtained from the OS (see 'go doc runtime.MemStats.Sys') + -> Unit: + -> DataType: Gauge +NumberDataPoints #0 +Data point attributes: + -> service_instance_id: Str(3a58f71f-fe6a-43d0-9cc4-58eeac12dca4) + -> service_name: Str(otelcol) + -> service_version: Str(0.104.0) +StartTimestamp: 1970-01-01 00:00:00 +0000 UTC +Timestamp: 2024-07-15 18:36:08.374 +0000 UTC +Value: 27874568.000000 +Metric #17 +Descriptor: + -> Name: otelcol_exporter_sent_metric_points + -> Descript +asdf +Bucket #0 asdfasdfasdf +blah +Bucket #1 qpwerq +qwer +zdxf From efd403a1533939058e7ddadf430ef28371096c69 Mon Sep 17 00:00:00 2001 From: Denise Li Date: Mon, 15 Jul 2024 17:03:17 -0400 Subject: [PATCH 2/3] fix pipe --- Justfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Justfile b/Justfile index a0362dbe93..1df60b3ef5 100644 --- a/Justfile +++ b/Justfile @@ -210,7 +210,7 @@ otel-stream: docker run \ -p {{otelGrpcPort}}:{{otelGrpcPort}} \ -p 55679:55679 \ - otel/opentelemetry-collector:0.104.0 | sed 's/\([A-Z].* \)/\ + otel/opentelemetry-collector:0.104.0 2>&1 | sed 's/\([A-Z].* #\)/\ \1/g' # Stop the docker container running otel. From 91abb28f6f9230c6ac29b8f18d35b140da9f9484 Mon Sep 17 00:00:00 2001 From: Denise Li Date: Mon, 15 Jul 2024 20:01:32 -0400 Subject: [PATCH 3/3] cleanup --- Justfile | 1 - text.txt | 27 --------------------------- 2 files changed, 28 deletions(-) delete mode 100644 text.txt diff --git a/Justfile b/Justfile index 1df60b3ef5..58b0355da8 100644 --- a/Justfile +++ b/Justfile @@ -206,7 +206,6 @@ otel-ui: otel-stream: #!/bin/bash - grpcPort=$(cat docker-compose.yml | grep "OTLP gRPC" | sed 's/:.*//' | sed -r 's/ +- //') docker run \ -p {{otelGrpcPort}}:{{otelGrpcPort}} \ -p 55679:55679 \ diff --git a/text.txt b/text.txt deleted file mode 100644 index 33f27e06fa..0000000000 --- a/text.txt +++ /dev/null @@ -1,27 +0,0 @@ -StartTimestamp: 2024-07-15 18:35:28.374 +0000 UTC -Timestamp: 2024-07-15 18:36:08.374 +0000 UTC -Value: 18720272.000000 -Metric #16 -Descriptor: - -> Name: otelcol_process_runtime_total_sys_memory_bytes - -> Description: Total bytes of memory obtained from the OS (see 'go doc runtime.MemStats.Sys') - -> Unit: - -> DataType: Gauge -NumberDataPoints #0 -Data point attributes: - -> service_instance_id: Str(3a58f71f-fe6a-43d0-9cc4-58eeac12dca4) - -> service_name: Str(otelcol) - -> service_version: Str(0.104.0) -StartTimestamp: 1970-01-01 00:00:00 +0000 UTC -Timestamp: 2024-07-15 18:36:08.374 +0000 UTC -Value: 27874568.000000 -Metric #17 -Descriptor: - -> Name: otelcol_exporter_sent_metric_points - -> Descript -asdf -Bucket #0 asdfasdfasdf -blah -Bucket #1 qpwerq -qwer -zdxf