File tree 2 files changed +4
-3
lines changed
src/opentelemetry/distributedcontext 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -87,13 +87,14 @@ def get_entries(self) -> typing.Iterable[Entry]:
87
87
def get_entry_value (
88
88
self ,
89
89
key : EntryKey
90
- ) -> typing .Optional [Entry ]:
90
+ ) -> typing .Optional [EntryValue ]:
91
91
"""Returns the entry associated with a key or None
92
92
93
93
Args:
94
94
key: the key with which to perform a lookup
95
95
"""
96
- return self ._container .get (key )
96
+ if key in self ._container :
97
+ return self ._container [key ].value
97
98
98
99
99
100
class DistributedContextManager :
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ def test_get_entry_value_present(self):
83
83
value = self .context .get_entry_value (
84
84
self .entry .key ,
85
85
)
86
- self .assertIs (value , self .entry )
86
+ self .assertIs (value , self .entry . value )
87
87
88
88
def test_get_entry_value_missing (self ):
89
89
key = distributedcontext .EntryKey ("missing" )
You can’t perform that action at this time.
0 commit comments