Troubleshooting Errors in LangChain with Phoenix Docker Setup
Hello, I just installed Phoenix as a stand-alone instance via Docker following these instructions. I verified it is running by viewing the web portal in a browser on port 6006. I then have a LangChain notebook on another machine following this example, but commenting out the headers since not using the cloud version of Phoenix or authentication. import os # Import open-telemetry dependencies from opentelemetry import trace as trace_api from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter from opentelemetry.sdk import trace as trace_sdk from opentelemetry.sdk.resources import Resource from opentelemetry.sdk.trace.export import SimpleSpanProcessor # Import the automatic instrumentor from OpenInference from openinference.instrumentation.langchain import LangChainInstrumentor # Set the Space and API keys as headers for authentication # headers = f"space_key={ARIZE_SPACE_KEY},api_key={ARIZE_API_KEY}" # os.environ['OTEL_EXPORTER_OTLP_TRACES_HEADERS'] = headers # Set resource attributes for the name and version for your application resource = Resource( attributes={ "model_id":"langchain-llm-tracing", # Set this to any name you'd like for your app "model_version":"1.0", # Set this to a version number string } ) # Define the span processor as an exporter to the desired endpoint endpoint = "http://192.168.1.69:6006/v1/traces" span_exporter = OTLPSpanExporter(endpoint=endpoint) span_processor = SimpleSpanProcessor(span_exporter=span_exporter) # Set the tracer provider tracer_provider = trace_sdk.TracerProvider(resource=resource) tracer_provider.add_span_processor(span_processor=span_processor) trace_api.set_tracer_provider(tracer_provider=tracer_provider) # Finish automatic instrumentation LangChainInstrumentor().instrument() When I execute the LangChain code I get the following errors on the client side:
Transient error StatusCode.UNAVAILABLE encountered while exporting traces to 192.168.1.69:6006, retrying in 1s.
Transient error StatusCode.UNAVAILABLE encountered while exporting traces to 192.168.1.69:6006, retrying in 2s.
Transient error StatusCode.UNAVAILABLE encountered while exporting traces to 192.168.1.69:6006, retrying in 4s.
Transient error StatusCode.UNAVAILABLE encountered while exporting traces to 192.168.1.69:6006, retrying in 8s.
Transient error StatusCode.UNAVAILABLE encountered while exporting traces to 192.168.1.69:6006, retrying in 16s.Looking at the Phoenix server Docker logs, I just see the following messages: INFO: 192.168.65.1:33533 - "PRI %2A HTTP/2.0" 404 Not Found WARNING: Invalid HTTP request received. INFO: 192.168.65.1:33654 - "PRI %2A HTTP/2.0" 404 Not Found WARNING: Invalid HTTP request received. INFO: 192.168.65.1:33755 - "PRI %2A HTTP/2.0" 404 Not Found WARNING: Invalid HTTP request received. Any ideas what this could be or what I can do to dig into the details further?
