Skip to content

Commit

Permalink
More stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
patricklafrance committed Nov 4, 2024
1 parent 63f289a commit 61d2248
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 20 deletions.
13 changes: 13 additions & 0 deletions .changeset/pretty-plants-dress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
"@squide/firefly-webpack-configs": minor
"@squide/module-federation": minor
"@squide/webpack-configs": minor
"@squide/react-router": minor
"@squide/env-vars": minor
"@squide/firefly": minor
"@squide/i18next": minor
"@squide/core": minor
"@squide/msw": minor
---

Now dispatching events to enable instrumentation packages for observability platforms.
12 changes: 12 additions & 0 deletions .changeset/swift-foxes-tickle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
"@squide/firefly-honeycomb": major
---

New package instrumentating Squide for [Honeycomb](https://www.honeycomb.io/).

This packages includes:

- [registerHoneycombInstrumentation](https://gsoft-inc.github.io/wl-squide/reference/honeycomb/registerhoneycombinstrumentation/)
- [setGlobalSpanAttributes](https://gsoft-inc.github.io/wl-squide/reference/honeycomb/setglobalspanattributes/)

A [migration guide](https://gsoft-inc.github.io/wl-squide/upgrading/migrate-to-firefly-v9.3) is available to update a Squide application to v9.3 and use Honeycomb observability.
2 changes: 1 addition & 1 deletion docs/guides/setup-honeycomb.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Before going forward with this guide, make sure that you migrated to [v9.3](../u

To monitor application performance, Workleap has adopted [Honeycomb](https://www.honeycomb.io/), a tool that helps teams manage and analyze telemetry data from distributed systems. Built on OpenTelemetry, Honeycomb provides a [robust API](https://open-telemetry.github.io/opentelemetry-js/) for tracking frontend telemetry.

Honeycomb's in-house [HoneycombWebSDK](https://docs.honeycomb.io/send-data/javascript-browser/honeycomb-distribution/) includes great default instrumentation. However, this instrumentation has to be extended to capture traces specific to Squide features. To facilitate this, Squide provides the `registerHoneycombInstrumentation` function from the [@squide/firefly-honeycomb]() package.
Honeycomb's in-house [HoneycombWebSDK](https://docs.honeycomb.io/send-data/javascript-browser/honeycomb-distribution/) includes great default instrumentation. However, this instrumentation has to be extended to capture traces specific to Squide features. To facilitate this, Squide provides the `registerHoneycombInstrumentation` function.

## Setup the host application

Expand Down
3 changes: 1 addition & 2 deletions packages/firefly-honeycomb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,13 @@
},
"devDependencies": {
"@opentelemetry/instrumentation": "*",
"@opentelemetry/instrumentation-fetch": "*",
"@opentelemetry/instrumentation-document-load": "*",
"@opentelemetry/instrumentation-fetch": "*",
"@opentelemetry/instrumentation-user-interaction": "*",
"@opentelemetry/instrumentation-xml-http-request": "*",
"@opentelemetry/sdk-trace-web": "*",
"@swc/core": "1.7.26",
"@swc/jest": "0.2.36",
"@testing-library/react": "16.0.1",
"@types/jest": "29.5.13",
"@types/uuid": "10.0.0",
"@workleap/eslint-plugin": "3.2.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/firefly-honeycomb/src/activeSpan.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Span } from "@opentelemetry/api";
import type { FetchCustomAttributeFunction } from "@opentelemetry/instrumentation-fetch";
import type { RuntimeLogger } from "@squide/core";
import type { RuntimeLogger } from "@squide/firefly";
import { v4 as uuidv4 } from "uuid";

declare global {
Expand Down
15 changes: 0 additions & 15 deletions packages/firefly/tests/AppRouterReducer.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -407,21 +407,6 @@ describe("useAppRouterReducer", () => {
expect(result.current[0].deferredRegistrationsUpdatedAt).toEqual(Date.parse("2020-02-14"));
});

// test.only("when \"active-route-is-protected\" is dispatched, \"isActiveRouteProtected\" is true", () => {
// const runtime = new FireflyRuntime();

// const { result } = renderUseAppRouterReducerHook(runtime, false, false, false);

// expect(result.current[0].isActiveRouteProtected).toBeFalsy();

// act(() => {
// // dispatch
// result.current[1]({ type: "active-route-is-protected" });
// });

// expect(result.current[0].isActiveRouteProtected).toBeTruthy();
// }, 50000);

test("when \"active-route-is-public\" is dispatched, \"activeRouteVisiblity\" is \"public\"", () => {
const runtime = new FireflyRuntime();

Expand Down
2 changes: 1 addition & 1 deletion samples/endpoints/express-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"@opentelemetry/api": "1.9.0",
"@opentelemetry/auto-instrumentations-node": "0.51.0",
"@opentelemetry/exporter-trace-otlp-http": "0.53.0",
"@opentelemetry/instrumentation-http": "0.53.0",
"@opentelemetry/instrumentation-express": "0.43.0",
"@opentelemetry/instrumentation-http": "0.53.0",
"@opentelemetry/sdk-node": "0.53.0",
"cors": "2.8.5",
"express": "4.21.1"
Expand Down

0 comments on commit 61d2248

Please sign in to comment.