Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

FR: Trace and Tag propagation convenience for message-based systems #265

@deanberris

Description

@deanberris

In census-instrumentation/opencensus-java#1013 there's an implementation of convenience functions and types for imbuing/reconstituting tags and trace information in messages meant to be processed asynchronously. As more "serverless" or "event-driven" architectures start relying on non-RPC mechanisms for triggering work, it makes a lot of sense to be able to consistently do this across the programming languages.

If we can make it so that we support more types of messages than those used in traditional message bus/broker mediated systems, then that would be better. There's #228 for Kafka messages, but the problem and design space is more general. This applies to some more message types:

  • JavaScript/Web Service Workers
  • WebRTC
  • SMTP/Email
  • Pub/Sub or Message Bus systems (Kafka, Google Pub/Sub, RabbitMQ, etc.)
  • WebSocket messages
  • DBus messages
  • HTTP messages

This may make it necessary to ensure all language implementations have a consistent way of marshalling/un-marshalling messages that are encoded in whatever message format. Java seems to already have an implementation for supporting Google Cloud Pub/Sub messages, it might make sense to start there and expand to other message bus implementations.

Ideally, the client libraries themselves would support adding hooks allowing the OpenCensus tag/trace propagation mechanics to kick in, but that's more invasive than providing users some convenience functions for marshalling/un-marshalling messages that may contain OpenCensus tag/trace information.

For my current needs, implementations at least in Python and Go would be hugely beneficial.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions