Skip to content

Commit cae4219

Browse files
committed
feat: add test for with_service_name
1 parent 3397dd2 commit cae4219

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

opentelemetry-sdk/src/resource/builder.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ mod tests {
8686
|| {
8787
let resource = Resource::builder()
8888
.with_detector(Box::new(EnvResourceDetector::new()))
89+
.with_service_name("my_test_service_name")
8990
.with_key_value(KeyValue::new("test1", "test_value"))
9091
.with_key_values(vec![
9192
KeyValue::new("test1", "test_value1"),
@@ -97,6 +98,7 @@ mod tests {
9798
resource,
9899
Resource::new(vec![
99100
KeyValue::new("key", "value"),
101+
KeyValue::new(SERVICE_NAME, "my_test_service_name"),
100102
KeyValue::new("test1", "test_value1"),
101103
KeyValue::new("test2", "test_value2"),
102104
KeyValue::new("k", "v"),

0 commit comments

Comments
 (0)