diff --git a/agentops/session.py b/agentops/session.py index cd75fa53..9e209c21 100644 --- a/agentops/session.py +++ b/agentops/session.py @@ -92,16 +92,6 @@ def __init__(self, session: Session, **kwargs): self._shutdown = False super().__init__(**kwargs) - @property - def headers(self): - # Add API key to headers along with JWT - headers = { - "Authorization": f"Bearer {self.session.jwt}", - "Content-Type": "application/json", - "X-Agentops-Api-Key": self.session.config.api_key, - } - return headers - @property def endpoint(self): return f"{self.session.config.endpoint}/v2/create_events" @@ -165,11 +155,6 @@ def export(self, spans: Sequence[ReadableSpan]) -> SpanExportResult: json.dumps({"events": events}).encode("utf-8"), api_key=self.session.config.api_key, jwt=self.session.jwt, - header={ - "Authorization": f"Bearer {self.session.jwt}", - "Content-Type": "application/json", - "X-AgentOps-Api-Key": self.session.config.api_key, - }, ) if res.code == 200: @@ -574,11 +559,6 @@ def create_agent(self, name, agent_id): serialized_payload, api_key=self.config.api_key, jwt=self.jwt, - header={ - "Authorization": f"Bearer {self.jwt}", - "Content-Type": "application/json", - "X-Agentops-Api-Key": self.config.api_key, - }, ) except ApiServerException as e: return logger.error(f"Could not create agent - {e}")