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

fix: enable tracing flag #508

Merged
merged 4 commits into from
Feb 26, 2025
Merged

fix: enable tracing flag #508

merged 4 commits into from
Feb 26, 2025

Conversation

anhnd350309
Copy link
Contributor

What type of PR is this?

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

Fix enable tracing flag in grid example

Related Issues and PRs

  • Related: #
  • Closes: #

Added/updated tests?

  • Yes
  • No, because why: just fix the flag tracing
  • I need help with writing tests

Additional Info

add instructions or screenshots on what you might think is relevant or instructions on how to manually test it

[optional] Do we need to perform any post-deployment tasks?

Copy link

github-actions bot commented Feb 24, 2025

Flamegraph.com report

flamegraph.pprof
See in flamegraph.com

Created by Flamegraph.com Github Action

@anhnd350309 anhnd350309 marked this pull request as ready for review February 24, 2025 13:09
@sfroment
Copy link
Member

sfroment commented Feb 24, 2025

if you which we can go with that

interface EnvConfig {
	readonly bootstrapPeers: string;
	readonly enableTracing: boolean;
	readonly renderInfoInterval: number;
	readonly discoveryInterval: number;
	readonly mode: string;
}

function getBooleanFromEnv(key: keyof ImportMetaEnv): boolean {
	const value = import.meta.env[key];
	return value === "true" || value === "1" || Boolean(value);
}

function getNumberFromEnv(key: keyof ImportMetaEnv): number {
	const value = import.meta.env[key];
	return Number(value);
}

export const env: EnvConfig = {
	bootstrapPeers: import.meta.env.VITE_BOOTSTRAP_PEERS,
	enableTracing: getBooleanFromEnv("VITE_ENABLE_TRACING"),
	renderInfoInterval: getNumberFromEnv("VITE_RENDER_INFO_INTERVAL"),
	discoveryInterval: getNumberFromEnv("VITE_DISCOVERY_INTERVAL"),
	mode: import.meta.env.MODE,
};

in an env.ts file
LMK what you think

@sfroment sfroment merged commit 7cf7b5b into main Feb 26, 2025
14 checks passed
sfroment added a commit that referenced this pull request Feb 26, 2025
…t-object

* origin/main:
  fix: enable tracing flag (#508)
sfroment added a commit that referenced this pull request Feb 26, 2025
* origin/main:
  fix: enable tracing flag (#508)
  chore: release v0.8.5
  feat(ci): add workflow to test docker image can be built (#517)
  chore: release v0.8.4
  chore: add typescript dep to root
  chore: release v0.8.3
  fix: any types
  fix: prod build; deps misused
  chore: release v0.8.2
  fix: docker build
  fix: buf build modules
  chore: release v0.8.1
  chore: fix rebase
  chore: bump version; update repo url
sfroment added a commit that referenced this pull request Feb 27, 2025
* origin/main:
  feat: add package keychain (#513)
  feat: make resolveConflicts function optional (#487)
  feat: Add log level into ConnectObjectOptions (#518)
  fix(examples/grid): 🐛 bug where eventListener is added multiple time (#507)
  fix: enable tracing flag (#508)
sfroment added a commit that referenced this pull request Feb 28, 2025
* origin/main:
  feat: add package keychain (#513)
  feat: make resolveConflicts function optional (#487)
  feat: Add log level into ConnectObjectOptions (#518)
  fix(examples/grid): 🐛 bug where eventListener is added multiple time (#507)
  fix: enable tracing flag (#508)
  chore: release v0.8.5
  feat(ci): add workflow to test docker image can be built (#517)
  chore: release v0.8.4
  chore: add typescript dep to root
  chore: release v0.8.3
  fix: any types
  fix: prod build; deps misused
  chore: release v0.8.2
  fix: docker build
  fix: buf build modules
  chore: release v0.8.1
  chore: fix rebase
  chore: bump version; update repo url
sfroment added a commit that referenced this pull request Feb 28, 2025
* origin/main:
  feat: add package keychain (#513)
  feat: make resolveConflicts function optional (#487)
  feat: Add log level into ConnectObjectOptions (#518)
  fix(examples/grid): 🐛 bug where eventListener is added multiple time (#507)
  fix: enable tracing flag (#508)
  chore: release v0.8.5
  feat(ci): add workflow to test docker image can be built (#517)
  chore: release v0.8.4
  chore: add typescript dep to root
  chore: release v0.8.3
  fix: any types
  fix: prod build; deps misused
  chore: release v0.8.2
  fix: docker build
  fix: buf build modules
  chore: release v0.8.1
  chore: fix rebase
  chore: bump version; update repo url
@d-roak d-roak deleted the fix/tracing-grid branch March 11, 2025 22:22
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.

2 participants