Giter Site home page Giter Site logo

mozilla / glean Goto Github PK

View Code? Open in Web Editor NEW
365.0 23.0 118.0 494.38 MB

Modern cross-platform telemetry

Home Page: https://mozilla.github.io/glean/

License: Mozilla Public License 2.0

Rust 49.48% Shell 5.05% Kotlin 19.02% Objective-C 0.03% Swift 11.97% Makefile 0.33% Batchfile 0.06% Java 0.35% Python 12.10% Dockerfile 0.28% Groovy 1.28% Handlebars 0.06%

glean's Introduction

Glean SDK

Glean logo

glean-core on crates.io License: MPL-2.0 The Glean SDK book Build Status

Documentation

All documentation is available online:

Overview

Refer to the documentation for using and developing the Glean SDK.

For an overview of Glean beyond just the SDK, see the section in the Firefox data docs.

The code in this repository is organized as follows:

Note: The Glean SDK requires at least Rust 1.66.0. Older versions are untested.

Contact

To contact us you can:

Credits

The Glean logo artwork was contributed by Diana Ciufo. It's licensed under MPL.

Alumni contributors

  • Georg Fritzsche
  • Michael Droettboom

See the full list of contributors for:

License

This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/

glean's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

glean's Issues

Android unit tests failing

SUPPORTED_ABIS
java.lang.NoSuchFieldError: SUPPORTED_ABIS
	at mozilla.telemetry.glean.GleanInternalAPI.initializeCoreMetrics(Glean.kt:74)
	at mozilla.telemetry.glean.GleanInternalAPI.initialize(Glean.kt:42)
	at mozilla.telemetry.glean.GleanTest.simple smoke test(GleanTest.kt:19)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.robolectric.RobolectricTestRunner$HelperTestRunner$1.evaluate(RobolectricTestRunner.java:601)
	at org.robolectric.internal.SandboxTestRunner$2.evaluate(SandboxTestRunner.java:260)
	at org.robolectric.internal.SandboxTestRunner.runChild(SandboxTestRunner.java:130)
	at org.robolectric.internal.SandboxTestRunner.runChild(SandboxTestRunner.java:42)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.robolectric.internal.SandboxTestRunner$1.evaluate(SandboxTestRunner.java:84)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:106)
	at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:58)
	at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:38)
	at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:66)
	at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
	at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
	at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
	at com.sun.proxy.$Proxy2.processTestClass(Unknown Source)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:117)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
	at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:155)
	at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:137)
	at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:404)
	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
	at java.lang.Thread.run(Thread.java:745)

@Dexterp37: Any ideas? Not sure why this field doesn't show up in this context...

Error when using locally-published Glean in Fenix

Problem
I followed the instructions from https://mozilla.github.io/glean/book/dev/howtos/locally-published-components-in-fenix.html, but I am still unable to run ./gradlew publishToMavenLocal without errors in the glean repository root. Specifically: can't open file 'null/build/tools/make_standalone_toolchain.py after running a sudo command, or java.nio.file.AccessDeniedException: /Users/emmamalysz/Desktop/glean/glean/glean-core/android/build/generated/source/buildConfig/release/mozilla/telemetry/glean/BuildConfig.javawhen running the command normally.

Additional Info

  • My .bash_profile includes export ANDROID_NDK_ROOT="$HOME/android-ndk-r20b" and export ANDROID_NDK_HOME="$ANDROID_NDK_ROOT". I tried with the r20 NDK download as well as the one the doc currently points to (r21). The environment variables have the correct path when executing printenv

  • I ran rustup update to ensure it is up to date and installed the targets.

  • I edited the local.properties files to try both the emulator and 32 bit arm.

  • I also tried installing NDK directly from Android studio

Documentation for Python SDK uses outdated API

According to the documentation for the Python SDK custom pings can be submitted as follows:

from glean import load_pings
pings = load_pings("pings.yaml")
pings.search.submit()

I'm seeing an AttributeError for glean-sdk==22.1.0:

AttributeError: 'PingType' object has no attribute 'submit'

I checked the wheel for the above version and it seems the API is now called send. ๐Ÿ“

Consider merging type implementation and in-memory/serialization into one thing

Right now type implementations only direct their stuff to the storage (relying on bincode or other serialization).
The loading and then serialization to json are implemented on the enum:

https://github.com/badboy/glean.rs/blob/094390e7030f402be0f8b60caca3b6d98f3a1b2c/glean-core/src/metrics/mod.rs

This means adding a new metric needs a new file for the implementation, entries in the mentioned enum and implementing the category and serialization.
Maybe we can move category and json-serialization into the type directly?

Increases Firefox iOS binary size by 10%

Firefox iOS apk goes from 38MB to 42MB, a 10% increase in binary size, can we reduce the footprint of this lib? This will impact loading time at the DYLD stage, but also we have to control size creep over time so it is good to catch these growth spurts as they happen.

Add API to suppress logging on multiple `initialization` calls

In Fenix, Glean is initialized inside the Application class. Every Roboletric test runs Application.onCreate, meaning Glean is re-initialized many times inside of tests. This adds some unrelated logs to many unit tests that don't touch Glean, so a way to turn off the logging would be appreciated.

Labelled Counters documentation is confusing with respect to limits

The labelled counters documentation has a section under Recording API for limits. That section states:

  • Only increments;
  • Saturates at the largest value that can be represented as a 32-bit signed integer.

Further down the page (past the testing API, and into the metrics parameters) under the label section, you get:

  • Conform to the label formatting regular expression.
  • Each label must have a maximum of 60 bytes, when encoded as UTF-8.
  • This list itself is limited to 100 labels.

I feel at least the limit of the number of labels should be included in the limits section at the top of the page - since that is an important limit for this being a labelled counter.

(Very uncommon) NPE in Glean.initialize in FFTV

This is super low priority, as far as I'm aware we've only seen one instance of this crash in the wild. But since it's an NPE, I thought it might be useful for you to be aware of it.

Exception details

NullPointerException
Attempt to read from null array
Screen Shot 2019-07-18 at 1 27 32 PM

This is the line referenced.

If you decide to you'd like you investigate deeper into this, we can get you access to the crash on Sentry. It has some more information about the device that might be helpful.

Re-think current makefile

From #8:

On my machine this is Sdk. Will we run into issues on case-sensitive filesystems here?

Maybe we:

  • Don't set the variable in the makefile (but fail if it is unset?)
  • or Don't use the makefile at all anymore

glean schema for name lengths is too small

From ongoing perf metrics work:

==============================================================================
/home/bkoz/.gradle/caches/transforms-2/files-2.1/46845cc3aba3f1450763f30dcd49b4e0/jetified-geckoview-default-71.0.20190909113211/metrics.yaml:
navigation: time_to_non_blank_paint

  'time_to_non_blank_paint' is not valid under any of the given schemas
      'time_to_non_blank_paint' is too long

This seems undocumented in the guidelines for "naming things" here:
https://mozilla.github.io/glean/book/user/adding-new-metrics.html#naming-things

For the current m-c gecko tree, the longest name in the Histograms.json file is:
'CACHE_SERVICE_LOCK_WAIT_MAINTHREAD_NSCACHEENTRYDESCRIPTOR_DOOMANDFAILPENDINGREQUESTS'

which is 84 characters long, not including glean's category. It seem as if a 100 character name limit should be sufficient, but if there is a hard limit please document that in end-user docs.

java.lang.UnsatisfiedLinkError: Error looking up function 'glean_enable_logging': undefined symbol: glean_enable_logging

I get this crash when substituting local GeckoView into Fenix using local.properties.

09-23 14:10:38.080  6444  6444 D AndroidRuntime: Shutting down VM
09-23 14:10:38.081  6444  6444 E AndroidRuntime: FATAL EXCEPTION: main
09-23 14:10:38.081  6444  6444 E AndroidRuntime: Process: org.mozilla.fenix.debug, PID: 6444
09-23 14:10:38.081  6444  6444 E AndroidRuntime: java.lang.UnsatisfiedLinkError: Error looking up function 'glean_enable_logging': undefined symbol: glean_enable_logging
09-23 14:10:38.081  6444  6444 E AndroidRuntime: 	at com.sun.jna.Function.<init>(Function.java:252)
09-23 14:10:38.081  6444  6444 E AndroidRuntime: 	at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:600)
09-23 14:10:38.081  6444  6444 E AndroidRuntime: 	at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:576)
09-23 14:10:38.081  6444  6444 E AndroidRuntime: 	at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:562)
09-23 14:10:38.081  6444  6444 E AndroidRuntime: 	at com.sun.jna.Library$Handler.invoke(Library.java:243)
09-23 14:10:38.081  6444  6444 E AndroidRuntime: 	at java.lang.reflect.Proxy.invoke(Proxy.java:813)
09-23 14:10:38.081  6444  6444 E AndroidRuntime: 	at $Proxy1.glean_enable_logging(Unknown Source)
09-23 14:10:38.081  6444  6444 E AndroidRuntime: 	at mozilla.telemetry.glean.rust.LibGleanFFIKt.loadIndirect(LibGleanFFI.kt:91)
09-23 14:10:38.081  6444  6444 E AndroidRuntime: 	at mozilla.telemetry.glean.rust.LibGleanFFI$Companion.<clinit>(LibGleanFFI.kt:100)
09-23 14:10:38.081  6444  6444 E AndroidRuntime: 	at mozilla.telemetry.glean.rust.LibGleanFFI.<clinit>(LibGleanFFI.kt)
09-23 14:10:38.081  6444  6444 E AndroidRuntime: 	at mozilla.telemetry.glean.private.CounterMetricType.<init>(CounterMetricType.kt:42)
09-23 14:10:38.081  6444  6444 E AndroidRuntime: 	at org.mozilla.fenix.GleanMetrics.PerfStartup.<clinit>(PerfStartup.kt:129)
09-23 14:10:38.081  6444  6444 E AndroidRuntime: 	at org.mozilla.fenix.FenixApplication.onCreate(FenixApplication.kt:102)
09-23 14:10:38.081  6444  6444 E AndroidRuntime: 	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1024)
09-23 14:10:38.081  6444  6444 E AndroidRuntime: 	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5361)
09-23 14:10:38.081  6444  6444 E AndroidRuntime: 	at android.app.ActivityThread.-wrap2(ActivityThread.java)
09-23 14:10:38.081  6444  6444 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1528)
09-23 14:10:38.081  6444  6444 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:102)
09-23 14:10:38.081  6444  6444 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:154)
09-23 14:10:38.081  6444  6444 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:6077)
09-23 14:10:38.081  6444  6444 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
09-23 14:10:38.081  6444  6444 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
09-23 14:10:38.081  6444  6444 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)

Simulator can be confusing wrt supplied data and unitless display

When going to https://mozilla.github.io/glean/book/reference/metrics/timing_distribution.html?time-unit=milliseconds&data-options=log-normally-distributed it's not clearly marked that the units provided for the buckets are in nanoseconds (it's implied by what's written in the information box below but that's not very clear).

The data provided also doesn't exercise a very large range, making it report a largest bucket which is much smaller than the maximum value documented earlier in the page. This was somewhat confusing to me (although when adding custom data I could verify I could get larger buckets).

Execution failed for task ':app:gleanGenerateMetricsDocsForDebug'. > Glean documentation generation failed.

Please help to resolve the below build error in the Android project.

Task :app:gleanGenerateMetricsDocsForDebug

Glean SDK - generating docs for E:\Examples\fenix-master\fenix-master\app\metrics.yaml in E:\Examples\fenix-master\fenix-master/docs

Glean SDK - generating docs for E:\Examples\fenix-master\fenix-master\app\pings.yaml in E:\Examples\fenix-master\fenix-master/docs

**> Task :app:gleanGenerateMetricsDocsForDebug FAILED

Execution failed for task ':app:gleanGenerateMetricsDocsForDebug'.

Glean documentation generation failed.**

Expose an API to disable glean-managed pings.

Glean currently provides the ability to send custom pings with no client_id. This allows collecting population wide telemetry without tracking a user across time.

For short lived applications (Firefox background tasks), this conflicts with baseline pings being sent automatically, as the two occur in sufficiently close proximity that it's probable as a vector to deanonymize users.

In order to accommodate this use case, Glean would need to expose a way to prevent baseline pings from being sent.

nanos/millis confusion in event timestamp?

I noticed that the rust docs for EventMetric.record require a timestamp in nanoseconds:

/// * `timestamp` - A monotonically increasing timestamp, in nanoseconds.

But the Kotlin bindings pass in the value of SystemClock.elapsedRealtime(), which is in milliseconds:

Which is correct?

The docs also aren't clear what will happen if the passed-in timestamp is not monotonic; I happened to notice this because I passed a value in nanoseconds from rust code and then some android code passed a value in milliseconds and then there was a panic inside glean, but I don't know if that's the expected behaviour.

Chain of Trust errors on signing tasks

RyanVM noticed some chain of trust errors:
https://firefox-ci-tc.services.mozilla.com/tasks/groups/CrIshxNpQPGHuAMsnsOjEA

This is due to a key rotation we did last week and the fact that the cached docker-image task was run on a worker that had the old key. To fix it, we'll need to cause a rebuild.

Unfortunately glean is using a non-standard index route which is causing the add-new-jobs action to fail, and it is also using an older version of Taskgraph that is missing the rebuild-cached-tasks action. Both of these things should be simple to fix.

Failure to install with system python on macos

Not sure if this affects older versions, but on Big Sur, both on x86_64 and arm64, /usr/bin/pip3 install glean-sdk fails with:

    ERROR: Command errored out with exit status 1:
     command: /Library/Developer/CommandLineTools/usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/lt/4my_883x0ws52k3rk0g0pnhh0000gn/T/pip-install-aebnl0it/glean-sdk/setup.py'"'"'; __file__='"'"'/private/var/folders/lt/4my_883x0ws52k3rk0g0pnhh0000gn/T/pip-install-aebnl0it/glean-sdk/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
         cwd: /private/var/folders/lt/4my_883x0ws52k3rk0g0pnhh0000gn/T/pip-install-aebnl0it/glean-sdk/
    Complete output (171 lines):
    c/_cffi_backend.c:5887:16: warning: comparison of integers of different signs: 'ffi_status' and 'int' [-Wsign-compare]
        if (status == -1) {
            ~~~~~~ ^  ~~
    1 warning generated.
    c/_cffi_backend.c:5887:16: warning: comparison of integers of different signs: 'ffi_status' and 'int' [-Wsign-compare]
        if (status == -1) {
            ~~~~~~ ^  ~~
    1 warning generated.
    Traceback (most recent call last):
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/bdist_egg.py", line 172, in run
        cmd = self.call_command('install_lib', warn_dir=0)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/bdist_egg.py", line 158, in call_command
        self.run_command(cmdname)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/install_lib.py", line 15, in run
        self.byte_compile(outfiles)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/command/install_lib.py", line 132, in byte_compile
        byte_compile(files, optimize=0,
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/util.py", line 466, in byte_compile
        compile(file, cfile, dfile)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/py_compile.py", line 157, in compile
        os.makedirs(dirname)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/os.py", line 213, in makedirs
        makedirs(head, exist_ok=exist_ok)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/os.py", line 213, in makedirs
        makedirs(head, exist_ok=exist_ok)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/os.py", line 213, in makedirs
        makedirs(head, exist_ok=exist_ok)
      [Previous line repeated 2 more times]
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/os.py", line 223, in makedirs
        mkdir(name, mode)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/sandbox.py", line 310, in wrap
        path = self._remap_input(name, path, *args, **kw)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/sandbox.py", line 452, in _remap_input
        self._violation(operation, os.path.realpath(path), *args, **kw)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/sandbox.py", line 407, in _violation
        raise SandboxViolation(operation, args, kw)
    setuptools.sandbox.SandboxViolation: SandboxViolation: mkdir('/Users/glandium/Library/Caches/com.apple.python/private/var/folders/lt/4my_883x0ws52k3rk0g0pnhh0000gn/T/easy_install-pt76e000', 511) {}
    
    The package setup script has attempted to modify files on your system
    that are not within the EasyInstall build area, and has been aborted.
    
    This package cannot be safely installed by EasyInstall, and may not
    support alternate installation locations even if you run its setup
    script by hand.  Please inform the package's author and the EasyInstall
    maintainers to find out if a fix or workaround is available.
    
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/sandbox.py", line 154, in save_modules
        yield saved
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/sandbox.py", line 195, in setup_context
        yield
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/sandbox.py", line 250, in run_setup
        _execfile(setup_script, ns)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/sandbox.py", line 45, in _execfile
        exec(code, globals, locals)
      File "/var/folders/lt/4my_883x0ws52k3rk0g0pnhh0000gn/T/easy_install-pt76e000/cffi-1.14.4/setup.py", line 179, in <module>
        package_dir={
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/__init__.py", line 145, in setup
        return distutils.core.setup(**attrs)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/core.py", line 163, in setup
        raise SystemExit("error: " + str(msg))
    SystemExit: error: SandboxViolation: mkdir('/Users/glandium/Library/Caches/com.apple.python/private/var/folders/lt/4my_883x0ws52k3rk0g0pnhh0000gn/T/easy_install-pt76e000', 511) {}
    
    The package setup script has attempted to modify files on your system
    that are not within the EasyInstall build area, and has been aborted.
    
    This package cannot be safely installed by EasyInstall, and may not
    support alternate installation locations even if you run its setup
    script by hand.  Please inform the package's author and the EasyInstall
    maintainers to find out if a fix or workaround is available.
    
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 1144, in run_setup
        run_setup(setup_script, args)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/sandbox.py", line 253, in run_setup
        raise
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/contextlib.py", line 131, in __exit__
        self.gen.throw(type, value, traceback)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/sandbox.py", line 195, in setup_context
        yield
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/contextlib.py", line 131, in __exit__
        self.gen.throw(type, value, traceback)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/sandbox.py", line 166, in save_modules
        saved_exc.resume()
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/sandbox.py", line 141, in resume
        six.reraise(type, exc, self._tb)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/_vendor/six.py", line 685, in reraise
        raise value.with_traceback(tb)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/sandbox.py", line 154, in save_modules
        yield saved
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/sandbox.py", line 195, in setup_context
        yield
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/sandbox.py", line 250, in run_setup
        _execfile(setup_script, ns)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/sandbox.py", line 45, in _execfile
        exec(code, globals, locals)
      File "/var/folders/lt/4my_883x0ws52k3rk0g0pnhh0000gn/T/easy_install-pt76e000/cffi-1.14.4/setup.py", line 179, in <module>
        package_dir={
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/__init__.py", line 145, in setup
        return distutils.core.setup(**attrs)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/core.py", line 163, in setup
        raise SystemExit("error: " + str(msg))
    SystemExit: error: SandboxViolation: mkdir('/Users/glandium/Library/Caches/com.apple.python/private/var/folders/lt/4my_883x0ws52k3rk0g0pnhh0000gn/T/easy_install-pt76e000', 511) {}
    
    The package setup script has attempted to modify files on your system
    that are not within the EasyInstall build area, and has been aborted.
    
    This package cannot be safely installed by EasyInstall, and may not
    support alternate installation locations even if you run its setup
    script by hand.  Please inform the package's author and the EasyInstall
    maintainers to find out if a fix or workaround is available.
    
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/lt/4my_883x0ws52k3rk0g0pnhh0000gn/T/pip-install-aebnl0it/glean-sdk/setup.py", line 16, in <module>
        from setup import *
      File "/private/var/folders/lt/4my_883x0ws52k3rk0g0pnhh0000gn/T/pip-install-aebnl0it/glean-sdk/glean-core/python/setup.py", line 152, in <module>
        setup(
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/__init__.py", line 144, in setup
        _install_setup_requires(attrs)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/__init__.py", line 139, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/dist.py", line 716, in fetch_build_eggs
        resolved_dists = pkg_resources.working_set.resolve(
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/__init__.py", line 780, in resolve
        dist = best[req.key] = env.best_match(
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1065, in best_match
        return self.obtain(req, installer)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1077, in obtain
        return installer(requirement)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/dist.py", line 786, in fetch_build_egg
        return cmd.easy_install(req)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 679, in easy_install
        return self.install_item(spec, dist.location, tmpdir, deps)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 705, in install_item
        dists = self.install_eggs(spec, download, tmpdir)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 890, in install_eggs
        return self.build_and_install(setup_script, setup_base)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 1158, in build_and_install
        self.run_setup(setup_script, setup_base, args)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 1146, in run_setup
        raise DistutilsError("Setup script exited with %s" % (v.args[0],))
    distutils.errors.DistutilsError: Setup script exited with error: SandboxViolation: mkdir('/Users/glandium/Library/Caches/com.apple.python/private/var/folders/lt/4my_883x0ws52k3rk0g0pnhh0000gn/T/easy_install-pt76e000', 511) {}
    
    The package setup script has attempted to modify files on your system
    that are not within the EasyInstall build area, and has been aborted.
    
    This package cannot be safely installed by EasyInstall, and may not
    support alternate installation locations even if you run its setup
    script by hand.  Please inform the package's author and the EasyInstall
    maintainers to find out if a fix or workaround is available.
    
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

(this blocks the install of moz-phab)

Support Alpine Linux

Currently, the released wheel is glean_sdk-33.9.1-cp36-abi3-manylinux2014_x86_64.whl.

Events ping instantiated with wrong name

Expected:
Events ping is instantiated with the name "events." Events ping is sent as scheduled.

Observed:
Events ping is instantiated with the name "metrics." Events ping is not sent and Glean logs show the error ERROR glean_core] Attempted to submit unknown ping 'events'

STR:

  1. In Firefox Desktop, define an event metric and ensure its metrics.yaml is added toolkit/components/glean/metrics_index.py.
  2. Instrument Firefox to record the event.
  3. Build Firefox using Glean v42.1.0
  4. Set the RUST_LOG and GLEAN_DEBUG_VIEW_TAG environment variables. Rust logging should be at least error level.
  5. Mach run the build and perform the action the produces the event
  6. Close Firefox
  7. Mach run the build again.
  8. Observe the rust log in the terminal and lack of events ping in the Glean Debug ping viewer

memory_distribution types cannot set memory_unit

given this (ostensibly valid via glinter) metrics.yaml file:

network.cache:
capacity:
type: memory_distribution
memory_unit: megabyte
gecko_datapoint: NETWORK_CACHE_SIZE
description: |
Cache size in megabytes keyed by cache capacity calculation type. Numbers are sampled periodically, every time 2GB of data is written to the cache.
bugs:
- 1600000
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1529352
notification_emails:
- [email protected]
expires: "2020-12-01"

I see the following build error when being assembled via local substitution in fenix nightly:

Task :app:generateMetricsSourceForGeckoNightlyForPerformanceTest
Glean SDK - generating API from /home/bkoz/.gradle/caches/transforms-2/files-2.1/60ae3cd839ddd6fb60cae15c91c21294/jetified-geckoview-default-71.0.20190925114021/metrics.yaml

Task :app:compileGeckoNightlyForPerformanceTestKotlin FAILED
e: /home/bkoz/src/mozilla-fenix.git/app/build/generated/source/glean/geckoNightly/forPerformanceTest/kotlin/NetworkCache.kt

NetworkCache.txt

: (45, 9): No value passed for parameter 'memoryUnit'

FAILURE: Build failed with an exception.

I'll attach the NetworkCache.kt file (renamed NetworkCache.txt for the filter)
NetworkCache.txt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.