Skip to content

experimental clientTraceMetadata feature does not produce meta tags #2924

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

Open
pieh opened this issue May 12, 2025 · 0 comments
Open

experimental clientTraceMetadata feature does not produce meta tags #2924

pieh opened this issue May 12, 2025 · 0 comments
Labels
Next.js e2e test failure Errors identified through the Next.js repo e2e tests

Comments

@pieh
Copy link
Contributor

pieh commented May 12, 2025

Example failure:

 ● clientTraceMetadata › app router › should inject propagation data for a dynamically server-side-rendered page

    expect(received).toContain(expected) // indexOf

    Expected substring: "<meta name=\"my-test-key-1\" content=\"my-test-value-1\">"
    Received string:    "<head><meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"><link rel=\"preload\" as=\"script\" fetchpriority=\"low\" href=\"/_next/static/chunks/webpack-193d6f1dd590c8a5.js\"><script src=\"/_next/static/chunks/4bd1b696-0d720e2a8e3347a2.js\" async></script><script src=\"/_next/static/chunks/684-d355f4db0abc1a0f.js\" async></script><script src=\"/_next/static/chunks/main-app-0170bb3ac93153a0.js\" async></script><script>document.querySelectorAll('body link[rel=\"icon\"], body link[rel=\"apple-touch-icon\"]').forEach(el => document.head.appendChild(el))</script><script src=\"/_next/static/chunks/polyfills-42372ed130431b0a.js\" nomodule></script></head>"

      11 |       const $ = await next.render$('/app-router/dynamic-page')
      12 |       const headHtml = $.html('head')
    > 13 |       expect(headHtml).toContain(
         |                        ^
      14 |         '<meta name="my-test-key-1" content="my-test-value-1">'
      15 |       )
      16 |       expect(headHtml).toContain(

      at Object.toContain (e2e/opentelemetry/client-trace-metadata/client-trace-metadata.test.ts:13:24)

It appears that something in our handling prevents Next.js from producing expected <meta> tags when clientTraceMetadata experimental feature is enabled.

Data

The following is parsed automatically by the Next.js repo e2e test report generator.

test: test/e2e/opentelemetry/client-trace-metadata/client-trace-metadata.test.ts
reason: clientTraceMetadata experimental feature not supported

@pieh pieh added the Next.js e2e test failure Errors identified through the Next.js repo e2e tests label May 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Next.js e2e test failure Errors identified through the Next.js repo e2e tests
Projects
None yet
Development

No branches or pull requests

1 participant