OpenTelemetry Bot d680729c09 [chore] Prepare release 0.90.0 (#29543) 1 жил өмнө
..
internal 6aea5689b3 [chore] use status Type in azureeventhubreceiver (#21391) 1 жил өмнө
testdata 31064e17bc map Azure logs into OpenTelemetry fields/attributes (#16357) 2 жил өмнө
Makefile e5b6bccc86 [receiver/azureeventhub] Add new component, Azure Event Hub Receiver (#12787) 2 жил өмнө
README.md 2816252149 [receiver/azureeventhub] Set Consumer Group by Configuration (#28634) 1 жил өмнө
azureresourcelogs_unmarshaler.go baf4ccef1a [pkg/translator/azure] New component for translating from Azure native formats (#25096) 1 жил өмнө
azureresourcemetrics_unmarshaler.go baf4ccef1a [pkg/translator/azure] New component for translating from Azure native formats (#25096) 1 жил өмнө
config.go 2816252149 [receiver/azureeventhub] Set Consumer Group by Configuration (#28634) 1 жил өмнө
config_test.go 5133f4ccd6 [chore] use license shortform (#22052) 1 жил өмнө
doc.go 5133f4ccd6 [chore] use license shortform (#22052) 1 жил өмнө
eventhubhandler.go 27a86e476e [pkg/translator/azure] Decode "incorrect" JSON without failing completely (#28650) 1 жил өмнө
eventhubhandler_test.go f4c44858b5 [all][chore] Moved from interface{} to any for all go code (#29072) 1 жил өмнө
factory.go baf4ccef1a [pkg/translator/azure] New component for translating from Azure native formats (#25096) 1 жил өмнө
factory_test.go 5133f4ccd6 [chore] use license shortform (#22052) 1 жил өмнө
go.mod d680729c09 [chore] Prepare release 0.90.0 (#29543) 1 жил өмнө
go.sum 40b485f08a Update core for v0.90.0 release (#29539) 1 жил өмнө
metadata.yaml 8a4348cb00 [chore] add codeowners to metadata (#24404) 1 жил өмнө
persister.go 5133f4ccd6 [chore] use license shortform (#22052) 1 жил өмнө
persister_test.go 5133f4ccd6 [chore] use license shortform (#22052) 1 жил өмнө
rawlogs_unmarshaler.go 5133f4ccd6 [chore] use license shortform (#22052) 1 жил өмнө
receiver.go 2d3ed4fb66 [chore] update core and calls to obsreport (#27042) 1 жил өмнө

README.md

Azure Event Hub Receiver

Status
Stability alpha: metrics, logs
Distributions contrib, observiq, splunk, sumo
Issues Open issues Closed issues
Code Owners @atoulme, @djaglowski

Overview

Azure resources and services can be configured to send their logs to an Azure Event Hub. The Azure Event Hub receiver pulls logs from an Azure Event Hub, transforms them, and pushes them through the collector pipeline.

Configuration

connection (Required)

A string describing the connection to an Azure event hub.

group (Optional)

The Consumer Group to read from. If empty will default to the default Consumer Group $Default

partition (Optional)

The partition to watch. If empty, it will watch explicitly all partitions.

Default: ""

offset (Optional)

The offset at which to start watching the event hub. If empty, it starts with the latest offset.

Default: ""

format (Optional)

Determines how to transform the Event Hub messages into OpenTelemetry logs. See the "Format" section below for details.

Default: "azure"

Example Configuration

receivers:
  azureeventhub:
    connection: Endpoint=sb://namespace.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=superSecret1234=;EntityPath=hubName
    partition: foo
    group: bar
    offset: "1234-5566"
    format: "azure"

This component can persist its state using the storage extension.

Format

raw

The "raw" format maps the AMQP properties and data into the attributes and body of an OpenTelemetry LogRecord, respectively. The body is represented as a raw byte array.

This format is not supported for Metrics.

azure

The "azure" format extracts the Azure log records from the AMQP message data, parses them, and maps the fields to OpenTelemetry attributes. The table below summarizes the mapping between the Azure common log format and the OpenTelemetry attributes.

| Azure | OpenTelemetry | |----------------------------------|----------------------------------------| | callerIpAddress (optional) | net.sock.peer.addr (attribute) | | correlationId (optional) | azure.correlation.id (attribute) | | category (optional) | azure.category (attribute) | | durationMs (optional) | azure.duration (attribute) | | Level (optional) | severity_number, severity_text (field) | | location (optional) | cloud.region (attribute) | | — | cloud.provider (attribute) | | operationName (required) | azure.operation.name (attribute) | | operationVersion (optional) | azure.operation.version (attribute) | | properties (optional) | azure.properties (attribute, nested) | | resourceId (required) | azure.resource.id (resource attribute) | | resultDescription (optional) | azure.result.description (attribute) | | resultSignature (optional) | azure.result.signature (attribute) | | resultType (optional) | azure.result.type (attribute) | | tenantId (required, tenant logs) | azure.tenant.id (attribute) | | time (required) | time_unix_nano (field) | | identity (optional) | azure.identity (attribute, nested) |

Note: JSON does not distinguish between fixed and floating point numbers. All JSON numbers are encoded as doubles.

For Metrics the Azure Metric Records are an array of "records" with the following fields.

Azure Open Telemetry
time time_unix_nano (field)
resourceId azure.resource.id (resource attribute)
metricName
timeGrain start_time_unix_nano (field)
total mapped to datapoint metricName + "_TOTAL"
count mapped to datapoint metricName + "_COUNT"
minimum mapped to datapoint metricName + "_MINIMUM"
maximum mapped to datapoint metricName + "_MAXIMUM"
average mapped to datapoint metricName + "_AVERAGE"

From this data a Metric of type Gauge is created with a Data Points that represents the values for the Metric including: Total, Minimum, Maximum, Average and Count.