Sign inSign up

stackify/retrace-otel-agent

By stackify

Updated about 2 years ago

Open Telemetry Agent for Retrace by Stackify

Image
0

5.1K

stackify/retrace-otel-agent repository overview

Stackify Retrace-Otel-Agent

An Open Telemetry receiver of OTLP and OTLPHTTP streams of data that processes and submits telemetry data to Stackify Retrace.

docker pull stackify/retrace-otel-agent:latest

Open Telemetry Routes

TypeRoute
OTLP (gRPC)https://<container>:443
OTLPHTTP (http)http://<container>:80/v1/logs, http://<container>:80/v1/traces

Configuration

Environment Variables

This is a list of available common environment variables.

NOTE: __ double underscores in environment variables are interpreted as a : when matching environment variables to json settings.

KeyValid ValuesUsage
RETRACE_ACTIVATIONKEY, RETRACE__ACTIVATIONKEYstringSets the tenant activation key
RETRACE_ENVIRONMENT, RETRACE__ENVIRONMENTNAMEstringSet the default environment for apps and the environment for the agent itself
RETRACE_HOSTTYPECONTAINER, AZURE ...Sets the resource detector used for self monitoring of the agent, defaults to Container
Available RETRACE_HOSTTYPEs
ValueDescription
CONTAINER(Default) Generic Container
AZUREAzure Deployment
AWS_EC2Amazon EC2 Instance
AWS_EBSAmazon Elastic Beanstalk
AWS_ECSAmazon Elastic Container Services
AWS_EKSAmazon Elastic Kubernetes Services

Log Filtering

These environment variables control what logs are allowed to be sent to retrace. It is disabled by default.

KeyValid ValuesUsage
RETRACE__ELM__FILTERENABLEDTrue, FalseSets whether filtering is enabled or not, defaults to False
RETRACE__ELM__LOGLEVELFILTERTRACE, DEBUG, ...Sets the minimum log level of logs that will be shipped to Retrace, defaults to TRACE
Available RETRACE__ELM__LOGLEVELFILTERs
  • TRACE (Default)
  • DEBUG
  • INFO
  • WARN
  • ERROR
  • FATAL
  • NONE

Json Configuration Files

  • /app/config/*.json : custom configuration json files. Application will attempt to add any json file mounted here to the application configuration.

Attachable Volumes (Optional)

  • /app/cache Application will store persistent cache in this directory. Mount here to preserve cache between container updates.
  • /app/diags Application will store generated diagnostics in this directory. Mount here to preserve diags between container updates.
  • /app/requests Application will store raw otlp request streams in this directory when debug logging is toggled. Mount here to make externally available. Contents will be included in any generated diagnostics.

Probes

CheckRoute
Startup<container>:80/health/startup
Liveness<container>:80/healthz
Ready<container>:80/ready

Local Access

Local access is against port 80 http://<container>:80. Local authentication to download diagnostics or view possible sensitive data is controlled through the Authentication configuration options and disabled by default.

Option 1

Set Environment Variables

Variable NameExamples
AGENT__LOCALAUTHENTICATION__MODEDisabled, PasswordOnly, DomainEmailAndPassword
AGENT__LOCALAUTHENTICATION__PASSWORDmypasswordhere
AGENT__LOCALAUTHENTICATION__DOMAINmydomain.com Do not insert the @ symbol

Option 2

attach json configuration file to /app/config/authentication.json

{
  "Agent" : {
    "LocalAuthentication" : {
      "Mode": "Disabled|PasswordOnly|DomainEmailAndPassword|UserList", // Disabled by default
      "Domain": "netreo.com", // checks that all emails used end in @netreo.com
      "Password": "N3tre@Ot3!", // default password
      "Users": {
        "[email protected]" : "***password***",
        "[email protected]" : "***password***",
        "[email protected]" : "***password***",
        "[email protected]" : "***password***"
      }
    }
  }
}

Authentication Modes

Local authenticated access is Disabled by default.

SettingDescription
Disabled(Default) no authenticated access.
PasswordOnlywill accept any email address.
DomainNameAndPasswordwill accept any email ending in that domain with the valid password.
UserListwill only accept email and password combinations defined in the Users list.

Docker-Compose Example

docker-compose.yml

version: '3.8'
services:
  # Retrace Otel Appliance
  retrace:
    image: stackify/retrace-otel-agent:latest
    ports:
      - "4080:80"
      - "4443:443"
    environment:
      - RETRACE_ACTIVATIONKEY=<Activation Key>
      - RETRACE_ENVIRONMENT=<My Environment Name>
      - AGENT__LOCALAUTHENTICATION__MODE=PasswordOnly
      - AGENT__LOCALAUTHENTICATION__PASSWORD=********
        
  # Otel Collector
  otelcol:
    image: otel/opentelemetry-collector-contrib:latest
    volumes:
      - ./collector-gateway.yml:/etc/collector-gateway.yml
    command: [ "--config=/etc/collector-gateway.yml" ]
    ports:
      - "4317:4317"        # OTLP gRPC receiver
      - "4318:4318"        # OTLP HTTP receiver
    depends_on:
      - retrace

collector-gateway.yml

receivers:
  otlp:
    protocols:
      http:
        endpoint: 0.0.0.0:4318
      grpc:
        endpoint: 0.0.0.0:4317

processors:
  batch:
    send_batch_size: 1000
    send_batch_max_size: 2000
    timeout: 1s

exporters:
  logging:
    loglevel: info

  # otel agent
  otlp/agent:
    endpoint: host.docker.internal:4443
    tls:
      insecure: true
      insecure_skip_verify: true

  otlphttp/agent:
    endpoint: http://host.docker.internal:4080
    tls:
      insecure_skip_verify: true


service:
  pipelines:
    traces:
      receivers: [otlp]
      processors: [batch]
      exporters: [logging, otlp/agent, otlphttp/agent]
    logs:
      receivers: [otlp]
      processors: [batch]
      exporters: [logging, otlp/agent, otlphttp/agent]

Tag summary

Content type

Image

Digest

sha256:fc5cbbdfb

Size

106.1 MB

Last updated

about 2 years ago

docker pull stackify/retrace-otel-agent