본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

RPC 시맨틱 컨벤션 안정성 마이그레이션 가이드

원문 보기 위키 갱신

경고

출처: 문서

본문

경고

이 문서는 진행 중이에요. RPC 시맨틱 컨벤션이 아직 안정(stable)으로 표시되지 않았고 여전히 변경이 진행 중이기 때문이에요.

변경 사항이 많고 그 영향이 넓은 사용자 기반에 미치기 때문에, OpenTelemetry가 게시한 기존 RPC 인스트루멘테이션은 사용자가 안정적인 RPC 시맨틱 컨벤션으로 전환하도록 돕는 마이그레이션 계획을 구현해야 해요. 안정적인 RPC 시맨틱 컨벤션으로 전환하는 사용자를 위한 계획 말이죠.

구체적으로, OpenTelemetry가 게시한 기존 RPC 인스트루멘테이션이 안정적인 RPC 시맨틱 컨벤션으로 업데이트될 때는 다음을 지켜야 해요:

  • SHOULD NOT change the version of the RPC conventions that they emit by 측정 단위 등이 포함되지만 여기에 국한되지는 않아요. 속성, 메트릭·스팬 이름, 측정 단위 등이 포함되지만 이것만 있는 것은 아니에요.

  • SHOULD introduce an environment variable OTEL_SEMCONV_STABILITY_OPT_IN in 이 변수는 다음 값을 받아요:

  • rpc - emit the stable RPC conventions, and stop emitting 이전 RPC 컨벤션은 더 이상 내보내지 않아요.

  • rpc/dup - emit both the old and the stable RPC conventions, 안정적인 시맨틱 컨벤션을 단계적으로 배포할 수 있게 해요.

  • The default behavior (in the absence of one of these values) is to continue 이전 RPC 컨벤션 버전을 계속해서 내보내는 것이에요. 인스트루멘테이션이 이전에 내보내던 버전을 계속 내보내요.

  • Need to maintain (security patching at a minimum) their existing major version 유지 관리해야 해요.

  • May drop the environment variable in their next major version and emit only 안정적인 RPC 컨벤션만 내보내는 식으로요.

참고

OTEL_SEMCONV_STABILITY_OPT_IN is only intended to be used when migrating 실험적 시맨틱 컨벤션에서 초기 안정 버전으로의 전환에 대해 말해요.

변경 사항 요약(Summary of changes)

이 섹션은 v1.37.0에서 TODO(최신)까지 RPC 시맨틱 컨벤션에 적용된 변경 사항을 요약해요. 에서부터 v1.37.0 까지 TODO(최신)까지요.

RPC 스팬 속성(RPC span attributes)

| | Change | PR | Comments

| rpc.system → rpc.system.name | #3176, #3203 | See below for changes to the values, also now marked as sampling-relevant

| rpc.method | #3223, #3203 | Now contains fully-qualified method name (e.g., com.example.ExampleService/exampleMethod), also now marked as sampling-relevant

| rpc.service | #3223 | Removed, integrated into rpc.method

| network.transport | #3350 | Removed

| network.type | #2857 | Removed

| rpc.grpc.status_code → rpc.response.status_code | #2920 | Changed from int to string (e.g., 0 → "OK")

| rpc.connect_rpc.error_code → rpc.response.status_code | #2920 |

| rpc.grpc.request.metadata.<key> | #3169 | Replaced by rpc.request.metadata.<key>

| rpc.grpc.response.metadata.<key> | #3169 | Replaced by rpc.response.metadata.<key>

| rpc.connect_rpc.request.metadata.<key> | #3169 | Replaced by rpc.request.metadata.<key>

| rpc.connect_rpc.response.metadata.<key> | #3169 | Replaced by rpc.response.metadata.<key>

| server.address | #3203, #3317 | Now marked as sampling-relevant; 이제 이것은 정적 구성에서 가져오며, 서버 인스턴스 그룹을 식별하는 임의의 문자열이 될 수 있어요.

| server.port | #3203, #3317 | Now marked as sampling-relevant; 이제 이것은 정적 구성에서 가져와요.

| New: error.type | #2852 |

| New: rpc.method_original | #3223 | Original method name when rpc.method is set to _OTHER

| client.address | #3488 | Removed

| client.port | #3488 | Removed

참고 자료:

  • RPC 스팬 v1.37.0
  • RPC 스팬(TODO)

rpc.system.name 값(values)

| | Change | PR | Comments

| apache_dubbo → dubbo | #3176 |

| connect_rpc → connectrpc | #3176 |

| java_rmi | #3176 | Removed, but can still be used as a custom value

| dotnet_wcf | #3176 | Removed, but can still be used as a custom value

| New: jsonrpc | #2503 |

참고 자료:

  • RPC 스팬 v1.37.0
  • RPC 스팬(TODO)

RPC 서버 호출 지속 시간 메트릭(RPC server call duration metric)

메트릭 변경 사항:

  • Name: rpc.server.duration → rpc.server.call.duration (#2961)
  • Unit: ms → s (#2961)
  • Description: Measures the duration of inbound RPC. → Measures the duration of inbound remote procedure calls (RPC). (#2961)
  • 히스토그램 버킷: 밀리초에서 초로 바뀐 것을 반영하도록 경계가 업데이트됐어요(#2961). 초 단위로 바뀐 것을 반영하도록요(#2961).
  • 요구 수준(Requirement level): 필수로 변경됨(#3284)
  • 속성(Attributes): 아래 표 참고 | | Attribute change | PR | Comments

| rpc.system → rpc.system.name | #3176 | See above for changes to the values

| rpc.method | #3223 | Now contains fully-qualified method name (e.g., com.example.ExampleService/exampleMethod)

| rpc.service | #3223 | Removed, integrated into rpc.method

| network.transport | #3350 | Removed

| network.type | #2857 | Removed

| server.address | #3197 | Changed from Recommended to Opt-In

| server.port | #3197 | Changed from Recommended to Opt-In

| New: rpc.response.status_code | #2920 |

| New: error.type | #2852 |

참고 자료:

  • Metric rpc.server.duration v1.37.0
  • Metric rpc.server.call.duration (TODO)

RPC 클라이언트 호출 지속 시간 메트릭(RPC client call duration metric)

메트릭 변경 사항:

  • Name: rpc.client.duration → rpc.client.call.duration (#2961)
  • Unit: ms → s (#2961)
  • Description: Measures the duration of outbound RPC. → Measures the duration of outbound remote procedure calls (RPC). (#2961)
  • 히스토그램 버킷: 밀리초에서 초로 바뀐 것을 반영하도록 경계가 업데이트됐어요(#2961). 초 단위로 바뀐 것을 반영하도록요(#2961).
  • 요구 수준(Requirement level): 필수로 변경됨(#3284)
  • 속성(Attributes): 아래 표 참고 | | Attribute change | PR | Comments

| rpc.system → rpc.system.name | #3176 | See above for changes to the values

| rpc.method | #3223 | Now contains fully-qualified method name (e.g., com.example.ExampleService/exampleMethod)

| rpc.service | #3223 | Removed, integrated into rpc.method

| network.transport | #3350 | Removed

| network.type | #2857 | Removed

| server.address | #3197 | Changed from Recommended to Required

| server.port | #3197 | Changed from Recommended to Conditionally Required

| New: rpc.response.status_code | #2920 |

| New: error.type | #2852 |

참고 자료:

  • Metric rpc.client.duration v1.37.0
  • Metric rpc.client.call.duration (TODO)

RPC 예외 이벤트(RPC exception events)

호출이 성공적으로 완료되지 못하게 하는 예외는 다음과 같이 기록돼요: rpc.client.call.exception and rpc.server.call.exception log-based events (#3426).

더 이상 사용되지 않는 이벤트(Deprecated events)

rpc.message 이벤트와 그 관련 속성은 대체 없이 더 이상 사용되지 않아요: | | Deprecated Event/Attribute | PR

| rpc.message event | #3283

| rpc.message.type | #3283

| rpc.message.id | #3283

| rpc.message.compressed_size | #3283

| rpc.message.uncompressed_size | #3283

더 이상 사용되지 않는 메트릭(Deprecated metrics)

다음 메트릭은 대체 없이 더 이상 사용되지 않아요: | | Deprecated Metric | PR

| rpc.server.requests_per_rpc | #2846

| rpc.server.responses_per_rpc | #2846

| rpc.client.requests_per_rpc | #2846

| rpc.client.responses_per_rpc | #2846

| rpc.server.request.size | #3267

| rpc.server.response.size | #3267

| rpc.client.request.size | #3267

| rpc.client.response.size | #3267