Skip to content

OtlpBatchBuilder with same ResourceAttributes for entire batch#25

Merged
snakefoot merged 3 commits into
NLog:masterfrom
snakefoot:BatchResources
Jun 22, 2026
Merged

OtlpBatchBuilder with same ResourceAttributes for entire batch#25
snakefoot merged 3 commits into
NLog:masterfrom
snakefoot:BatchResources

Conversation

@snakefoot

@snakefoot snakefoot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Single ScopeLogs + ResourceLogs for each batch of LogRecords (Reduce http-payload-size)

Include same resource-attributes for every batch:

  • service.name - ${appdomain:format=Friendly}
  • service.version - ${assembly-version:Default=}
  • host.name - ${hostname}
  • process.id - ${processid}
  • os.type - windows / linux / unknown
  • telemetry.sdk.language - dotnet
  • telemetry.sdk.name - NLog.Targets.OpenTelemetryHttpTarget
  • telemetry.sdk.version - 6.0.0

Include LogRecord-attributes, when possible:

  • logger.name - LogEventInfo.LoggerName
  • event.id - LogEventInfo.Properties["EventId"]
  • event.name - LogEventInfo.Properties["EventName"]
  • log.record.original - MessageTemplate - LogEventInfo.Message

Hopefully Preview2 will give a better out-of-the-box-experience.

@snakefoot snakefoot force-pushed the BatchResources branch 4 times, most recently from 8796202 to 2e10bc6 Compare June 20, 2026 15:14
@snakefoot snakefoot force-pushed the BatchResources branch 2 times, most recently from 215ba34 to a77833a Compare June 20, 2026 15:33
@snakefoot snakefoot force-pushed the BatchResources branch 4 times, most recently from 0e96e7d to 964a95c Compare June 21, 2026 12:00
@snakefoot snakefoot force-pushed the BatchResources branch 4 times, most recently from 7c0c9e8 to f0fa8b2 Compare June 21, 2026 21:48
@snakefoot snakefoot force-pushed the BatchResources branch 4 times, most recently from 18a9452 to 9c2c43b Compare June 21, 2026 22:31
@snakefoot snakefoot force-pushed the BatchResources branch 10 times, most recently from 34c2a21 to 34e3dcf Compare June 22, 2026 18:21
@snakefoot snakefoot merged commit bbb8ddd into NLog:master Jun 22, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant