Jina 3.11 Update

Announcing OpenTelemetry tracing and metrics

Abstract design of a tech release with a central computer chip, magnifying glass icon, and "3.11 New Release" text

Jina is a MLOps framework that empowers anyone to build cross-modal and multi-modal applications on the cloud. It uplifts a PoC into a production-ready service. Jina handles the infrastructure complexity, making advanced solution engineering and cloud-native technologies accessible to every developer.

Release ๐Ÿ’ซ Release v3.11.0 ยท jina-ai/jina
Release Note (3.11.0) Release time: 2022-10-24 14:42:35 This release contains 6 new features, 1 bug fix and 10 documentation improvements.๐Ÿ†• FeaturesAdd OpenTelemetry tracing and metrics with ba...

Release Note (3.11.0)

This release contains 6 new features, 1 bug fix and 10 documentation improvements.

๐Ÿ†• Features

Add OpenTelemetry tracing and metrics with basic configuration (#5175)

Jina now supports OpenTelemetry Tracing and Metrics libraries for increased observability and instrumentation of Jina Runtimes. Read the docs (#5291) for details. We also provide a migration guide for a smooth transition from the previously-supported Prometheus-only based metrics instrumentation.

You can integrate Jaeger or other distributed tracing tools to collect and visualize request-level and application level service operation attributes. This helps you analyze request-response lifecycle, application behavior and performance.

from jina import Executor, requests, DocumentArray

class MyExec(Executor):
    @requests
    def encode(self, docs: DocumentArray, **kwargs):
        with self.tracer.start_as_current_span(
            'encode', context=tracing_context
        ) as span:
            with self.monitor(
                'preprocessing_seconds', 'Time preprocessing the requests'
            ):
                docs.tensors = preprocessing(docs)
            with self.monitor(
                'model_inference_seconds', 'Time doing inference the requests'
            ):
                docs.embedding = model_inference(docs.tensors)

Record existing Prometheus metrics into OpenTelemetry histograms (#5275)

Prometheus-only based metrics are also available as OpenTelemetry supported metrics. You can switch to OpenTelemetry metrics with little effort.

Add default tracing interceptors to head gRPC connection pool (#5271)

Head Runtime supports default traces when forwarding requests to the shard replica.

Add gRPC metadata to Executors and Gateway deployments (#5221)

You can now provide HTTP header access tokens as client metadata for accessing external and authentication protected services.

from jina import Client

client = Client(host='api.clip.jina.ai', port=2096, tls=True, protocol='grpc')
client.post(on='/encode', metadata=(('authorization', '<your access token>'),))

Show local location of Executors in Hub (#5282)

Use the list sub command to list the locations of local Hub Executors:

jina hub list
asciicast

Dump to Statefulset in K8s when volumes are passed to Executor (#5265)

Jina will generate a Kubernetes Statefulset manifest for Executors if you provide volumes to the Flow.to_kubernets_yaml() method. Executors can persist data on mounted volumes and correctly scale horizontally if required.

๐Ÿž Bug Fixes

Invalid input raise exception (#5141)

  • Theclient.post() method was not raising an exception if any of the underlying async requests raised an exception.
  • The new version correctly raises the exception raised by any async request. The user can now correctly catch any exceptions and act upon the exception.

๐Ÿ“— Documentation Improvements

๐Ÿค˜ Contributors

We would like to thank all contributors to this release: