This message was deleted.
# ask-for-help
s
This message was deleted.
🍱 1
j
Hi! Do you mean custom spans? The key is to correctly use the trace API, especially parent spans and trace_id. cc @Aaron Pham
a
I believe spans should already be there. Would you mind shareing what type of trace you are looking for?
v
so, I have a service (it has no runner for now as we work out the interfaces/tracing etc) and a python function which looks as such (it's pseudo code, it works)
Copy code
bentoml_logger = logging.getLogger("bentoml")
@svc.api(...)
async def predict(x):
    [...]
    <http://logger.info|logger.info>("blablabla")
    [...]
    return ...
I also have the jaeger all-in-one docker running besides the service and tracing enabled using grpc However, when I do a request to the service, the trace only contains 4 spans: • one for the whole predict function • one named /predict http receive • one named /predict http send presumably for the response headers • one named /predict http send presumably for the response body I would like the log outputted by logger.info("blablabla") to be part of the trace. The text version of the logs contains the trace id ie (
blablabla (trace=...
) but it doesn't show in the trace from the jaeger's interface. Does this make sense? I have seen that bentoml already uses tools for opentelemetry instrumentation but I would have expected it to work for the bentoml logger, from what i've seen in the logging docs. Thank you!
a
Hmm, I’m not sure if this is the expected behaviour for user to use our logger like this.
bentoml_logger
is reserved specifically for BentoML internal. To include tracing from within the API function call we probably need to do more support wrt to logs