8장. Telemetry 데이터 전달


OpenTelemetry 수집기를 사용하여 Telemetry 데이터를 전달할 수 있습니다.

8.1. TempoStack 인스턴스에 추적 전달

TempoStack 인스턴스에 대한 전달 추적을 구성하려면 OpenTelemetry 수집기를 배포하고 구성할 수 있습니다. 지정된 프로세서, 수신자 및 내보내기를 사용하여 배포 모드에서 OpenTelemetry 수집기를 배포할 수 있습니다. 다른 모드는 추가 리소스에 연결된 OpenTelemetry 수집기 설명서를 참조하십시오.

사전 요구 사항

  • Red Hat build of OpenTelemetry Operator가 설치되어 있습니다.
  • Tempo Operator가 설치되어 있습니다.
  • TempoStack 인스턴스는 클러스터에 배포됩니다.

프로세스

  1. OpenTelemetry 수집기의 서비스 계정을 생성합니다.

    서비스 계정의 예

    apiVersion: v1
    kind: ServiceAccount
    metadata:
      name: otel-collector-deployment
    Copy to Clipboard Toggle word wrap

  2. 서비스 계정에 대한 클러스터 역할을 생성합니다.

    클러스터 역할의 예

    apiVersion: rbac.authorization.k8s.io/v1
    kind: ClusterRole
    metadata:
      name: otel-collector
    rules:
    - apiGroups: [""]
      resources: ["pods", "namespaces",]
      verbs: ["get", "watch", "list"] 
    1
    
    - apiGroups: ["apps"]
      resources: ["replicasets"]
      verbs: ["get", "watch", "list"] 
    2
    
    - apiGroups: ["config.openshift.io"]
      resources: ["infrastructures", "infrastructures/status"]
      verbs: ["get", "watch", "list"] 
    3
    Copy to Clipboard Toggle word wrap

    1
    이 예에서는 Pod네임스페이스 리소스에 대한 이러한 권한이 필요한 Kubernetes 특성 프로세서를 사용합니다.
    2
    또한 Kubernetes 특성 프로세서로 인해 replicasets 리소스에 이러한 권한이 필요합니다.
    3
    이 예제에서는 인프라상태 리소스에 대한 이러한 권한이 필요한 리소스 탐지 프로세서도 사용합니다.
  3. 클러스터 역할을 서비스 계정에 바인딩합니다.

    클러스터 역할 바인딩 예

    apiVersion: rbac.authorization.k8s.io/v1
    kind: ClusterRoleBinding
    metadata:
      name: otel-collector
    subjects:
    - kind: ServiceAccount
      name: otel-collector-deployment
      namespace: otel-collector-example
    roleRef:
      kind: ClusterRole
      name: otel-collector
      apiGroup: rbac.authorization.k8s.io
    Copy to Clipboard Toggle word wrap

  4. YAML 파일을 생성하여 OpenTelemetryCollector CR(사용자 정의 리소스)을 정의합니다.

    OpenTelemetry 수집기 예

    apiVersion: opentelemetry.io/v1beta1
    kind: OpenTelemetryCollector
    metadata:
      name: otel
    spec:
      mode: deployment
      serviceAccount: otel-collector-deployment
      config:
        receivers:
          jaeger:
            protocols:
              grpc: {}
              thrift_binary: {}
              thrift_compact: {}
              thrift_http: {}
          opencensus: {}
          otlp:
            protocols:
              grpc: {}
              http: {}
          zipkin: {}
        processors:
          batch: {}
          k8sattributes: {}
          memory_limiter:
            check_interval: 1s
            limit_percentage: 50
            spike_limit_percentage: 30
          resourcedetection:
            detectors: [openshift]
        exporters:
          otlp:
            endpoint: "tempo-simplest-distributor:4317" 
    1
    
            tls:
              insecure: true
        service:
          pipelines:
            traces:
              receivers: [jaeger, opencensus, otlp, zipkin] 
    2
    
              processors: [memory_limiter, k8sattributes, resourcedetection, batch]
              exporters: [otlp]
    Copy to Clipboard Toggle word wrap

    1
    수집기 내보내기는 OTLP를 내보내도록 구성되어 있으며 이 예에서는 이미 생성된 Tempo 배포자 엔드포인트인 "tempo-simplest-distributor:4317" 을 가리킵니다.
    2
    수집기는 Jaeger 추적을 위한 수신자로 구성되며 OpenCensus 프로토콜을 통해 OpenCensus 추적, Zipkin 프로토콜을 통한 Zipkin 추적 및 gRPC 프로토콜을 통한 OTLP 추적을 사용하여 구성됩니다.
작은 정보

Telemetrygen을 테스트로 배포할 수 있습니다.

apiVersion: batch/v1
kind: Job
metadata:
  name: telemetrygen
spec:
  template:
    spec:
      containers:
        - name: telemetrygen
          image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest
          args:
            - traces
            - --otlp-endpoint=otel-collector:4317
            - --otlp-insecure
            - --duration=30s
            - --workers=1
      restartPolicy: Never
  backoffLimit: 4
Copy to Clipboard Toggle word wrap
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat