This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Mozilla.Glean; | |
using Mozilla.Glean.Private; | |
using System; | |
using UnityEngine; | |
using static Mozilla.Glean.Glean; | |
public class main : MonoBehaviour | |
{ | |
// Start is called before the first frame update | |
void Start() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install-Package Mozilla.Telemetry.Glean -Version 0.0.2-alpha |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Initialize Glean SDK. `uploadEnabled` can be configured according to | |
// user telemetry enable|disable setting. | |
GleanInstance.Initialize( | |
applicationId: "org.test.glean.sample", | |
applicationVersion: "1.0", | |
uploadEnabled: true, | |
configuration: new Configuration(), | |
dataDir: gleanDataDir | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$schema: moz://mozilla.org/schemas/glean/metrics/1-0-0 | |
test: | |
hellow_world: | |
type: string | |
description: > | |
The first hello world metric. | |
send_in_pings: | |
- sample | |
bugs: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
$schema: moz://mozilla.org/schemas/glean/pings/1-0-0 | |
sample: | |
description: > | |
A sample custom ping. | |
include_client_id: true | |
bugs: | |
data_reviews: | |
notification_emails: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PM> Install-Package Serilog | |
PM> Install-Package Serilog.Sinks.Console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GleanInstance.Initialize( | |
applicationId: "org.mycompany.glean.tests", | |
applicationVersion: "0.1", | |
uploadEnabled: true, | |
configuration: new Configuration(channel: "debug", maxEvents: 500, pingTag: "unity_glean"), | |
dataDir: "data" | |
); | |
GleanInstance.SetUploadEnabled(false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>three.js vr - cubes</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | |
<link type="text/css" rel="stylesheet" href="main.css"> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const url = "https://2r5x7bfm7h.execute-api.us-west-2.amazonaws.com/v1/upload"; | |
const xhr = new XMLHttpRequest(); | |
if ("withCredentials" in xhr){ | |
xhr.open("POST", url, true); | |
} else if (typeof XDomainRequest != "undefined"){ | |
xhr = new XDomainRequest(); | |
xhr.open("POST", url); | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from mozlog.structuredlog import StructuredLogger, set_default_logger | |
from pathlib import Path | |
from glean import Glean, Configuration | |
from glean import (load_metrics, | |
load_pings) | |
import logging | |
def init_python_redirect_logger(logger): | |
"""Create a pipe to the main log, at debug level | |
This is so we can see logs from third party libraries (like Glean) |
NewerOlder