Skip to content

Commit 90ce62b

Browse files
committed
always allow mapped resource attributes, and fix tests
1 parent 657f350 commit 90ce62b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/OpenTelemetry.Exporter.Geneva/Internal/MsgPack/MsgPackTraceExporter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ internal int AppendResourceAttributesToBuffer(byte[] buffer, int cursor)
351351
}
352352
}
353353

354-
if (this.WithResourceAttributes == null || !this.WithResourceAttributes.Contains(entry.Key))
354+
if (!isDedicatedField && (this.WithResourceAttributes == null || !this.WithResourceAttributes.Contains(entry.Key)))
355355
{
356356
continue;
357357
}

test/OpenTelemetry.Exporter.Geneva.Tests/GenevaTraceExporterTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ public void GenevaTraceExporter_Serialization_Success(bool hasTableNameMapping,
206206
["cloud.roleVer"] = "9.0.15289.2",
207207
["resourceAndPrepopulated"] = "comes from prepopulated",
208208
},
209+
WithResourceAttributes = ["resourceAttribute", "resourceAndPrepopulated"],
209210
};
210211
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
211212
{

0 commit comments

Comments
 (0)