Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to parse JSON as proto (INVALID_ARGUMENT: could not find @type 'type.googleapis.com/envoy.config.trace.v3.DatadogConfig'): #31649

Closed
sujeets-toast opened this issue Jan 4, 2024 · 10 comments
Labels
area/tracing bug stale stalebot believes this issue/PR has not been touched recently

Comments

@sujeets-toast
Copy link

sujeets-toast commented Jan 4, 2024

Issue Template

Datadog not working in windows container as sidecar. I used as Linux container it's working for me.

Description:
I am trying to run envoy, Datadog and dotnet application as sidecar. I am able to create the and run the container with envoy as sidecar without Datadog. But when adding the Datadog tracing i am gating the below issue in windows container.
https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/trace/v3/datadog.proto#config-trace-v3-datadogconfig

Error:

[2024-01-04 22:42:07.291][1896][critical][main] [source/server/server.cc:141] error initializing config '  .\envoy.yaml': Unable to parse JSON as proto (INVALID_ARGUMENT: could not find @type 'type.googleapis.com/envoy.config.trace.v3.DatadogConfig'):

Full yaml

static_resources:
  listeners:
  - name: listener_0
    address:
      socket_address:
        address: 0.0.0.0
        port_value: 9902
    filter_chains:
    - filters:
      - name: envoy.filters.network.http_connection_manager
        typed_config:
          "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
          generate_request_id: true
          request_id_extension:
            typed_config:
              "@type": type.googleapis.com/envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig
              use_request_id_for_trace_sampling: false
          tracing:
            provider:
              name: envoy.tracers.datadog
              typed_config:
                "@type": type.googleapis.com/envoy.config.trace.v3.DatadogConfig
                collector_cluster: datadog_agent
                service_name: sa-envoy-proxy-web-service
          access_log:
          - name: envoy.access_loggers.stdout
            typed_config:
              "@type": type.googleapis.com/envoy.extensions.access_loggers.stream.v3.StdoutAccessLog
              # path: /dev/stdout
              # log_format:
              #   text_format_source:
              #     inline_string: "[%START_TIME%] \"%REQ(:METHOD)% %REQ(X-ENVOY-ORIGINAL-PATH?:PATH):256% %PROTOCOL%\" %RESPONSE_CODE% %RESPONSE_FLAGS% %BYTES_RECEIVED% %BYTES_SENT% %DURATION% %RESP(X-ENVOY-UPSTREAM-SERVICE-TIME)% \"%REQ(X-FORWARDED-FOR)%\" \"%REQ(USER-AGENT)%\" \"%REQ(X-REQUEST-ID)%\" \"%REQ(:AUTHORITY)%\" \"%UPSTREAM_HOST%\" \"%RESP(X-AMZN-RequestId)%\" \"%REQ(X-DATADOG-TRACE-ID)%\" \"%REQ(X-DATADOG-PARENT-ID)%\"\n"
          codec_type: auto
          stat_prefix: ingress_http
          route_config:
            name: local_route
            virtual_hosts:
            - name: backend_service
              domains:
              - "*"
              routes:
                - match:
                    prefix: "/"
                  route:
                    cluster: sa-envoy-proxy-cluster
          http_filters:
          - name: envoy.filters.http.health_check
            typed_config:
              "@type": type.googleapis.com/envoy.extensions.filters.http.health_check.v3.HealthCheck
              pass_through_mode: false
              headers:
                - exact_match: /healthcheck
                  name: :path
          - name: envoy.filters.http.router
            typed_config:
              "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
              suppress_envoy_headers: true
          use_remote_address: true
  clusters:
  - name: sa-envoy-proxy-cluster
    connect_timeout: 5s
    type: strict_dns
    lb_policy: round_robin
    load_assignment:
      cluster_name: sa-envoy-proxy-cluster
      endpoints:
      - lb_endpoints:
        - endpoint:
            address:
              socket_address:
                address: 172.89.194.61 # application host ip
                port_value: 80
                
  - name: datadog_agent
    connect_timeout: 5s
    type: strict_dns
    lb_policy: round_robin
    load_assignment:
      cluster_name: datadog_agent
      endpoints:
      - lb_endpoints:
        - endpoint:
            address:
              socket_address:
                address: 0.0.0.0
                port_value: 8126

admin:
  # access_log_path: "./logs/logs.txt"
  address:
    socket_address:
      address: 0.0.0.0
      port_value: 9201

Envoy Dockerfile

FROM envoyproxy/envoy-windows:v1.28-latest
# FROM envoyproxy/envoy-windows:v1.19-latest
EXPOSE 5000
EXPOSE 9201
EXPOSE 9202
COPY envoy.yaml './envoy.yaml'
COPY start_envoy.ps1 './start_envoy.ps1'
ENTRYPOINT ["powershell.exe", "./start_envoy.ps1"]

Reference Url:
https://docs.datadoghq.com/tracing/trace_collection/proxy_setup/?tab=envoy

@sujeets-toast sujeets-toast added the triage Issue requires triage label Jan 4, 2024
@adisuissa
Copy link
Contributor

cc @cgilmour @dgoffredo

@adisuissa adisuissa added bug area/tracing and removed triage Issue requires triage labels Jan 5, 2024
@dgoffredo
Copy link
Contributor

I don't know why that would happen, and am not familiar with Windows.

The only Windows references that I see are in the unit tests of some of the tracers, including Datadog's:

david@ein:~/src/envoy/test/extensions/tracers$ git grep -i windows
common/ot/BUILD:    # TODO(wrowe): envoy_extension_ rules don't currently exclude windows extensions
common/ot/BUILD:    tags = ["skip_on_windows"],
datadog/BUILD:    # TODO(wrowe): envoy_extension_ rules don't currently exclude windows extensions
datadog/BUILD:    tags = ["skip_on_windows"],
dynamic_ot/BUILD:    # TODO(wrowe): envoy_extension_ rules don't currently exclude windows extensions
dynamic_ot/BUILD:    tags = ["skip_on_windows"],
dynamic_ot/BUILD:    # TODO(wrowe): envoy_extension_ rules don't currently exclude windows extensions
dynamic_ot/BUILD:    tags = ["skip_on_windows"],
opencensus/BUILD:    # TODO(wrowe): envoy_extension_ rules don't currently exclude windows extensions
opencensus/BUILD:    tags = ["skip_on_windows"],
opencensus/BUILD:    # TODO(wrowe): envoy_extension_ rules don't currently exclude windows extensions
opencensus/BUILD:    tags = ["skip_on_windows"],

Might there be some policy in Envoy like "if the unit tests are skipped for a component, then exclude it also from the release build"?

@phlax
Copy link
Member

phlax commented Jan 5, 2024

its specifically excluded i think see here

WINDOWS_SKIP_TARGETS = [
"envoy.extensions.http.cache.file_system_http_cache",
"envoy.filters.http.file_system_buffer",
"envoy.filters.http.language",
"envoy.filters.http.sxg",
"envoy.tracers.dynamic_ot",
"envoy.tracers.datadog",
"envoy.tracers.opencensus",
]

@dgoffredo
Copy link
Contributor

Thanks, @phlax. That explains that.

We haven't tested dd-trace-cpp on Windows. It probably wouldn't be too much trouble to get it working, but Datadog has not received many requests for C++ on Windows, and I don't (yet) have a Windows development environment.

I've created an issue in dd-trace-cpp to track this. I don't know what its priority will be.

@sujeets-toast
Copy link
Author

Hi, Any update on this issue?

@dgoffredo
Copy link
Contributor

My teammate and I are playing with Windows builds (via CMake and Bazel, respectively). There is quite some work to do, and it is not a priority, but we are chipping away at it. Yesterday I was unable to get Envoy to build on Windows (quiche has been causing trouble), so I'll have to revisit that. There's also the question of whether the particular Windows toolchain used for Envoy releases will accept dd-trace-cpp's code. Mine and my teammate's setups disagree on whether the code should compile.

  • PR for my attempt at building on Windows via Bazel, with the goal of dd-trace-cpp Windows builds for Envoy.
  • PR draft for my teammate's attempt at building on Windows via CMake.

Is this a blocker for you, @sujeets-toast? If so, you might consider using Envoy's OpenTelemetry tracing extension in the interim. The Datadog Agent can be configured to listen on an OTLP interface, which then you can designate as the "collector" in the OpenTelemetry configuration. I can't find an example of this, but it should be possible.

Copy link

github-actions bot commented Feb 8, 2024

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale stalebot believes this issue/PR has not been touched recently label Feb 8, 2024
@dgoffredo
Copy link
Contributor

We can continue to track this in DataDog/dd-trace-cpp#84.

The only piece missing is that I have not been able to build Envoy on Windows, and so can't verify whether the Windows compatibility changes are adequate for enabling Windows builds of the Datadog tracing extension.

Revisiting Windows support is on our backlog, but not currently the highest priority.

@github-actions github-actions bot removed the stale stalebot believes this issue/PR has not been touched recently label Feb 9, 2024
Copy link

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale stalebot believes this issue/PR has not been touched recently label Mar 10, 2024
Copy link

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tracing bug stale stalebot believes this issue/PR has not been touched recently
Projects
None yet
Development

No branches or pull requests

4 participants