Skip to content

Commit d229226

Browse files
committed
Merge branch 'develop' into alanwest/apm-otel
2 parents 828ca95 + 57784fd commit d229226

File tree

255 files changed

+5542
-8648
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

255 files changed

+5542
-8648
lines changed

netlify.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ package = "@netlify/plugin-gatsby"
44
[functions]
55
included_files = ["!.cache/data/datastore/data.mdb","!.cache/query-engine"]
66

7+
[[edge_functions]]
8+
function = "inject-country" # Matches the filename without .js
9+
path = "/*" # Apply to all HTML pages served by Netlify
10+
711
[[headers]]
812
for = "/*"
913

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
export default async (request, context) => {
2+
const response = await context.next();
3+
4+
const contentType = response.headers.get("content-type");
5+
6+
// Only modify HTML responses.
7+
// If it's not HTML, return the original response unmodified.
8+
if (!contentType || !contentType.includes("text/html")) {
9+
return response;
10+
}
11+
12+
// Clone the response to be able to read its body.
13+
// A response body can only be read once.
14+
const clonedResponse = response.clone();
15+
let pageText = await clonedResponse.text();
16+
17+
// Get the country code from the Netlify geolocation context.
18+
// Default to "UNKNOWN" if not available.
19+
const countryCode = context.geo?.country?.code || "UNKNOWN";
20+
21+
// Prepare the script to inject. This makes the country code available on the client-side.
22+
const scriptToInject = `<script>window.userCountry = "${countryCode}";</script>`;
23+
24+
// Inject the script right before the closing </head> tag for early availability.
25+
// This is generally the best place for such scripts.
26+
if (pageText.includes("</head>")) {
27+
pageText = pageText.replace("</head>", `${scriptToInject}</head>`);
28+
} else if (pageText.includes("</body>")) {
29+
// Fallback: if </head> is not found, try injecting before </body>.
30+
// This is less ideal for early availability but better than not injecting.
31+
pageText = pageText.replace("</body>", `${scriptToInject}</body>`);
32+
}
33+
// If neither </head> nor </body> is found, the script won't be injected.
34+
// This might happen for malformed HTML or non-standard page structures.
35+
36+
// Return a new response with the modified HTML content.
37+
// It's important to preserve the original status, statusText, and headers.
38+
return new Response(pageText, {
39+
status: response.status,
40+
statusText: response.statusText,
41+
headers: response.headers,
42+
});
43+
};

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@
1010
"@emotion/styled": "^11.3.0",
1111
"@mdx-js/mdx": "2.0.0-next.8",
1212
"@mdx-js/react": "2.0.0-next.8",
13-
"@newrelic/gatsby-theme-newrelic": "9.12.1",
13+
"@newrelic/gatsby-theme-newrelic": "9.12.2",
1414
"@splitsoftware/splitio-react": "^1.2.4",
1515
"ansi-colors": "^4.1.3",
1616
"cockatiel": "^3.0.0-beta.0",
1717
"compare-versions": "^6.0.0-rc.2",
1818
"date-fns": "^2.17.0",
19-
"gatsby": "4.25.2",
19+
"gatsby": "4.25.7",
2020
"gatsby-plugin-manifest": "4.25.0",
2121
"gatsby-plugin-mdx": "3.4.0",
2222
"gatsby-plugin-netlify": "^5.1.1",
2323
"gatsby-plugin-react-helmet": "^5.4.0",
24-
"gatsby-plugin-sharp": "4.25.0",
24+
"gatsby-plugin-sharp": "4.25.1",
2525
"gatsby-remark-autolink-headers": "^5.4.0",
2626
"gatsby-remark-copy-linked-files": "^5.4.0",
2727
"gatsby-remark-images": "^6.4.0",
@@ -101,7 +101,7 @@
101101
"esmock": "^2.6.4",
102102
"expect": "^29.7.0",
103103
"form-data": "^3.0.0",
104-
"gatsby-plugin-typegen": "^2.2.4",
104+
"gatsby-plugin-typegen": "^3.1.0",
105105
"hast-util-to-mdast9": "npm:[email protected]",
106106
"hast-util-to-string": "^1.0.4",
107107
"hastscript": "^6.0.0",

scripts/releaseNotes.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ const INCLUDE_AGENTS = new Set([
7373
'sdk',
7474
'fluentbit',
7575
'nrdot',
76-
'prometheus'
76+
'prometheus',
77+
'aws_firehose_log_forwarder',
78+
'aws_lambda_log_forwarder'
7779
]);
7880

7981
const generateReleaseNoteObject = async (filePath) => {

src/content/docs/agentic-ai/knowledge-integration/knowledge-connector.mdx

Lines changed: 0 additions & 200 deletions
This file was deleted.

0 commit comments

Comments
 (0)