github jina-ai/serve v3.11.0
💫 Release v3.11.0

latest releases: v3.28.0, v3.27.20, v3.27.19...
2 years ago

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.

🆕 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 raises 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:

Don't miss a new serve release

NewReleases is sending notifications on new releases.