File tree Expand file tree Collapse file tree 4 files changed +8
-9
lines changed
instrumentation-genai/opentelemetry-instrumentation-cohere-v2 Expand file tree Collapse file tree 4 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -8,4 +8,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88## Unreleased
99
1010- Initial Cohere instrumentation
11- ([ #2759 ] ( https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2759 ) )
11+ ([ #3081 ] ( https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3081 ) )
Original file line number Diff line number Diff line change 11import cohere
2- import openai
32
4- import openai .resources
53from opentelemetry import trace
64from opentelemetry .instrumentation .cohere_v2 import CohereInstrumentor
75from opentelemetry .sdk .trace import TracerProvider
1816)
1917tracer = trace .get_tracer (__name__ )
2018
21- co = cohere .ClientV2 ('Z4EInAKRbIRKQV9lRZTciJqYyUBHXZGVUOAFBlRJ' )
19+ co = cohere .ClientV2 ()
2220
2321with tracer .start_as_current_span ("foo" ):
2422 response = co .chat (
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ interactions:
1717 accept-encoding :
1818 - gzip, deflate
1919 authorization :
20- - Bearer Z4EInAKRbIRKQV9lRZTciJqYyUBHXZGVUOAFBlRJ
20+ - Bearer test_cohere_api_key
2121 connection :
2222 - keep-alive
2323 content-length :
@@ -40,7 +40,7 @@ interactions:
4040 body :
4141 string : |-
4242 {
43- "id": "d6c6c01a-e089-47be-aa35-8e342a2425e6 ",
43+ "id": "68d63b3a-360d-4460-9cb9-8413ef2adc52 ",
4444 "message": {
4545 "role": "assistant",
4646 "content": [
@@ -77,7 +77,7 @@ interactions:
7777 content-type :
7878 - application/json
7979 date :
80- - Mon, 09 Dec 2024 21:38:34 GMT
80+ - Tue, 10 Dec 2024 16:04:21 GMT
8181 expires :
8282 - Thu, 01 Jan 1970 00:00:00 UTC
8383 num_chars :
@@ -93,11 +93,11 @@ interactions:
9393 x-accel-expires :
9494 - ' 0'
9595 x-debug-trace-id :
96- - 5f3eace25a51f8493ce35165bd0e83e6
96+ - 90f329169476c8dd3d7bf0071236f7f8
9797 x-endpoint-monthly-call-limit :
9898 - ' 1000'
9999 x-envoy-upstream-service-time :
100- - ' 196 '
100+ - ' 188 '
101101 x-trial-endpoint-call-limit :
102102 - ' 40'
103103 x-trial-endpoint-call-remaining :
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ def vcr_config():
6868 return {
6969 "filter_headers" : [
7070 ("cookie" , "test_cookie" ),
71+ ("authorization" , "Bearer test_cohere_api_key" ),
7172 ],
7273 "decode_compressed_response" : True ,
7374 "before_record_response" : scrub_response_headers ,
You can’t perform that action at this time.
0 commit comments