Skip to content

api: promote tracing operation to listener level#7723

Merged
htuch merged 5 commits intoenvoyproxy:masterfrom
kyessenov:ingress_egress
Jul 31, 2019
Merged

api: promote tracing operation to listener level#7723
htuch merged 5 commits intoenvoyproxy:masterfrom
kyessenov:ingress_egress

Conversation

@kyessenov
Copy link
Copy Markdown
Contributor

@kyessenov kyessenov commented Jul 25, 2019

Signed-off-by: Kuat Yessenov kuat@google.com
Description:

Promote tracing operation field to listener level. This expands the scope of the field to support two use cases:

  1. Tracing TCP connections: istio can send connection events to create a service communication graph. Network filters can benefit from the common knowledge about the intent of the listener/filter chain (client-side vs server-side).
  2. Using ingress/egress designation for other telemetry. The direction of the traffic is a useful label on metrics, and it is not explicit at the moment, unless depending on tracing configuration in HTTP connection manager or naming convention. Both workarounds are not ideal.

Risk Level: low
Testing: all unit tests continue to pass
Docs Changes:
Release Notes:

@kyessenov
Copy link
Copy Markdown
Contributor Author

I am not a fan of using the default value 0 to mean INGRESS, but alas, the API needs to stay backwards compatible. I'd like to add a third option to mean undefined/middle proxy, but that requires plumbing through all tracers.

@kyessenov
Copy link
Copy Markdown
Contributor Author

cc @mandarjog @bianpengyuan

Signed-off-by: Kuat Yessenov <kuat@google.com>
Copy link
Copy Markdown
Contributor

@snowp snowp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to me, just one comment on the V1 JSON handling

envoy::config::filter::network::http_connection_manager::v2::HttpConnectionManager::Tracing::
OperationName_Parse(StringUtil::toUpper(json_tracing->getString("operation_name")),
&operation_name);
envoy::api::v2::core::TracingOperation operation_name{};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need this change since this is for the deprecated V1 config handling

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I renamed the proto enum, so this is necessary for build to complete. It has no effect on the wire, since it's the same enum structurally.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yeah that makes sense

snowp
snowp previously approved these changes Jul 26, 2019
Copy link
Copy Markdown
Contributor

@snowp snowp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lizan
Copy link
Copy Markdown
Member

lizan commented Jul 26, 2019

cc @htuch for UDPA visibility / compatibility, this breaks generated code as well.

@kyessenov
Copy link
Copy Markdown
Contributor Author

I'm fine putting HTTP thingy where it belonged and duplicating the proto. I just think this is less sustainable long-term.

Copy link
Copy Markdown
Member

@rshriram rshriram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

..

@objectiser
Copy link
Copy Markdown
Contributor

@kyessenov Just wondering if this is a good opportunity to change the concept from "operation" to what it truly represents, i.e. "direction"? Operation can be misleading, as it can also refer to the "operation" being performed on the service.

@mattklein123
Copy link
Copy Markdown
Member

Waiting for @htuch to take a look from the API perspective.

/wait-any

@kyessenov
Copy link
Copy Markdown
Contributor Author

@objectiser I'm happy to pick a better name. Tracing direction? Traffic direction? Direction?

Signed-off-by: Kuat Yessenov <kuat@google.com>
@kyessenov
Copy link
Copy Markdown
Contributor Author

@htuch undid changes to HTTP tracing and added a TODO to align it later.

@objectiser
Copy link
Copy Markdown
Contributor

@kyessenov traffic direction LGTM.

@htuch
Copy link
Copy Markdown
Member

htuch commented Jul 29, 2019

OK, so this is now good from an API compat standpoint, but I'm questioning why we need this. Can't you use LDS metadata for direction? I'm wondering how universal the notion of ingress/egress is here vs. something that is Istio specific? Envoy is used in a ton of configurations, including edge and middle proxy, so ingress/egress doesn't really capture these, in particular when there is no local application. How do we deal with these?

@kyessenov
Copy link
Copy Markdown
Contributor Author

@htuch Ingress/egress is used in all HTTP tracers' configurations, so I think it's fairly common apart from istio as well. The issue with middle proxies is a real one, and I don't have a good answer here apart from adding a new enum value to model it. The question should be how would you model a middle proxy in the existing HTTP tracer config, and we can incorporate the answer into this new config.

@htuch
Copy link
Copy Markdown
Member

htuch commented Jul 29, 2019

@kyessenov OK. Can you open an issue for that? Also, needs master merge. Otherwise, LGTM.

Copy link
Copy Markdown
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a config test for this field on the listener, otherwise LGTM. Thank you!

/wait

Signed-off-by: Kuat Yessenov <kuat@google.com>
Signed-off-by: Kuat Yessenov <kuat@google.com>
@repokitteh-read-only
Copy link
Copy Markdown

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to api/.

🐱

Caused by: #7723 was synchronize by kyessenov.

see: more, trace.

@kyessenov
Copy link
Copy Markdown
Contributor Author

/retest

@repokitteh-read-only
Copy link
Copy Markdown

🔨 rebuilding ci/circleci: docs (failed build)

🐱

Caused by: a #7723 (comment) was created by @kyessenov.

see: more, trace.

@kyessenov
Copy link
Copy Markdown
Contributor Author

/retest

@repokitteh-read-only
Copy link
Copy Markdown

🐴 hold your horses - no failures detected, yet.

🐱

Caused by: a #7723 (comment) was created by @kyessenov.

see: more, trace.

@kyessenov
Copy link
Copy Markdown
Contributor Author

/retest

@repokitteh-read-only
Copy link
Copy Markdown

🐴 hold your horses - no failures detected, yet.

🐱

Caused by: a #7723 (comment) was created by @kyessenov.

see: more, trace.

@kyessenov
Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Commenter does not have sufficient privileges for PR 7723 in repo envoyproxy/envoy

Signed-off-by: Kuat Yessenov <kuat@google.com>
@repokitteh-read-only
Copy link
Copy Markdown

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to api/.

🐱

Caused by: #7723 was synchronize by kyessenov.

see: more, trace.

Copy link
Copy Markdown
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants