Telemetry

Captures request or response details for monitoring.

Use the Telemetry policy to capture selected request or response data for diagnostics, monitoring, or analytics purposes.

For more information on the policy parameter descriptions, see DataPower Nano Gateway documentation.

Example of a Telemetry policy in code view.

kind: Telemetry
apiVersion: api.ibm.com/v1
metadata:
  name: telemetry
  version: 1
  namespace: sample
spec: 
    attributes:
      "api_id" : "id_1234" 
      "api_name": "Test API"
    verbosity:      
      - level: basic # none, normal, detailed
        onSuccessTrimTo: basic
        inboundLevel : basic # none, normal, detailed
        outboundLevel: basic # none, normal, detailed
        operations: 
          - id: "operationId"
          - path: "/path"
            method: "GET"
          - path: "/path"
          - method: "GET"
  
Important: The none level cannot be used if you are running in SaaS or using API Call volume based licensing. All calls must be logged to analytics at basic level or higher.
Telemetry verbosity levels are as follows:
  • none - No attributes are included except verbosity.
  • basic - Includes attributes that are provided in the configurations and policy definitions along with the required attributes per OpenTelemetry specification.
  • normal - Includes request and response headers in addition to attributes included for basic level.
  • detailed - Includes request_body and response_body attributes containing the truncated payload of request and response respectively in addition to what's included for normal level.
The following table shows the mapping of telemetry levels from API Connect v10 to v12:
v10 Level v12 Level
activity basic
headers normal
payload detailed