英文:
Logging with istio
问题
我有一个在Kubernetes中通过REST Swagger客户端连接的微服务项目。
我想要记录所有请求和响应负载。
这样每个请求都有一个ID以及有关它来自哪里的信息和完整的负载。对于每个服务之间的调用也是如此。
使用Istio可以实现吗?
有分布式跟踪工具:Zipkin、Jaeger。但似乎它们只记录时间。
还是更好地在每个应用程序代码内部处理它?
英文:
I have a project with microservices in kubernetes connected though rest swagger clients.
I want to make logging of all request and response payloads.
So that for each request there is an id and information about where it came from with full payload. And for each service to service call as well.
Is it possible to do that with Istio?
There is distributed tracing tools: zipkin, jaeger. But looks like they log only time.
Or better to handle it each app code internally?
答案1
得分: 2
默认情况下,Istio 没有日志系统。我是说,除了 Kubernetes 的原生日志记录之外。
Zipkin 和 Jaeger 是追踪系统,用于追踪延迟,而不是日志记录。
您绝对可以通过 Istio 组件获取这些信息,但首先需要进行设置。我在 Istio 网站上找到了关于如何收集日志的 这个 文章。我会建议使用 Fluentd
+ Elasticsearch
,这将为您提供所需的强大功能。不幸的是,我没有任何示例。
英文:
By default, you don't have a logging system on Istio. I mean, besides the native logging of Kubernetes.
Zipkin and Jaeger are tracing systems, meaning for latency, not for logging.
You can definitely get this info through Istio components, but you will have to set it up first. I found this articles; in Istio website about how to collect logs. I would say Fluentd
+ Elasticsearch
would give you something as powerful as you need. Unfortunately I don't have any examples.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论