Extension:EventLogging/pt

Category:GPL licensed extensions/pt
Manual de extensões do MediaWiki
EventLogging
Estado de lançamento: estávelCategory:Stable extensions/pt
Implementação Página espacial Category:Special page extensions/pt, Base de dados Category:Database extensions/pt, ContentHandler Category:ContentHandler extensions/pt
Descrição Fornece uma estrutura para o registo de eventos da analítica
Autor(es) Ori.livnehdiscussão
Última versão atualizações contínuas
MediaWiki 1.33+Category:Extensions with manual MediaWiki version/pt
PHP 5.5+
Alterações à base de dados Não
Licença GNU - Licença Pública Geral 2.0 ou superior
Transferência Category:Extensions in Wikimedia version control/pt
  • $wgEventLoggingStreamNames
  • $wgEventLoggingSchemaApiUri
  • $wgEventLoggingServiceUri
  • $wgEventLoggingQueueLingerSeconds
  • $wgEventLoggingBaseUri
  • $wgEventLoggingSchemas
  • $wgEventLoggingDBname
Traduza a extensão EventLogging se esta estiver disponível em translatewiki.net
Função no Vagrant eventlogging
Problemas Tarefas em aberto · Reportar um erro
Category:All extensions/pt

A extensão "Registo de Eventos" torna possível a recolha estruturada dos dados em como os utilizadores interagem com os sites da MediaWiki.

Funcionalidades

  • EventLogging supports client-side logging from JavaScript and server-side logging from PHP.
  • Logging behavior can be dynamically configured using Extension:EventStreamConfig.
  • The events are JSON objects defined by versioned JSONSchemas stored in a schema git repository.
  • The extension does not include any back-end code for transporting, parsing, or loading these events. A separate service, EventGate, implements this functionality and deals with inserting events into Kafka. Events are then persisted in downstream datastores (e.g. Hive) via various ingestion pipelines. The details of these components are specific to Wikimedia Foundation's configuration.

Registo de Eventos na Wikimédia

The Wikimedia Foundation uses the EventLogging extension as part of a broader system for collecting, aggregating, storing, and analyzing user data within the limits set out by our privacy policy and data retention guidelines.

This page is about general use of the EventLogging extension. The Wikimedia Foundation uses EventLogging with WMF specific backend components and schema repositories. For Wikimedia specific and maintained documentation, see wikitech:Analytics/Systems/EventLogging and wikitech:Event Platform.

Installation

  • Exporte e coloque o ficheiro, ou ficheiros, num diretório chamado EventLogging, na sua pasta extensions/.
    Developers and code contributors should install the extension from Git instead, using:
    cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/EventLogging
    
  • Acrescente o seguinte código ao fundo do ficheiro $LocalSettings:
    wfLoadExtension( 'EventLogging' );
    $wgEventLoggingBaseUri = '/beacon/event';
    $wgEventLoggingServiceUri = '/beacon/intake-analytics';
    $wgEventLoggingStreamNames = false;
    
  • Yes Pronto – Na página especial Special:Version da sua wiki verifique se a extensão foi instalada.


Vagrant installation:

  • Se estiver a utilizar Vagrant , instale com vagrant roles enable eventlogging --provision

Configurar a localização de esquema

By default, the extension will look for schemas on Meta-Wiki.

The relevant default settings are:

# (default) $wgEventLoggingSchemaApiUri = 'https://meta.wikimedia.org/w/api.php';
# (default) $wgEventLoggingDBname = 'metawiki';

To use local schemas, or schemas from the central wiki of your own wikifarm, you need to override these. E.g. to use the Schema namespace of the local wiki, set

$wgEventLoggingSchemaApiUri = $wgServer . '/w/api.php';
$wgEventLoggingDBname = $wgDBname;

(and ensure the user account that will create the schemas is autoconfirmed).

Registar eventos utilizando "Registo de Eventos"

Desenvolver a extensão "Registo de Eventos"

Configuração do programador

As a developer, you will want to set up and use EventLogging on your development wiki to simulate its use in production.

Using Docker

Consulte MediaWiki-Docker/Configuration recipes/EventLogging

Utilizar mediawiki-vagrant

If you develop using mediawiki-vagrant, everything you need is encapsulated in the eventlogging role. Para a ativar, execute:

$ vagrant roles enable eventlogging
$ vagrant provision

Para o desenvolvimento de JavaScript

If working on the JavaScript client, you'll need to install dependencies with npm install from the folder you're developing in. Then you can use npm test to run ESLint for example. The "How to run tests" section below points out how to see JavaScript test results.

When adding the parameter trackdebug=true to the URL, the console in the browser's devtools will show the event logging being triggered.

Como executar testes

There are PHP tests, Python tests, and JavaScript tests.

To run JavaScript tests, visit Special:JavaScriptTest/qunit on your development wiki. (Consultar Manual:JavaScript unit testing.)

Para executar testes de PHP, nós utilizamos PHPUnit. Certifique-se que está instalado, depois

$ vagrant ssh
vagrant@mediawiki-vagrant:/vagrant/mediawiki$ composer phpunit:entrypoint -- extensions/EventLogging/testsEventLoggingExtensionFunctionsTest.php
Category:Extensions used on Wikimedia/pt#EventLogging/pt Category:Analytics extensions/pt Category:Statistics extensions/pt
Category:All extensions/pt Category:Analytics extensions/pt Category:ApiMain::moduleManager extensions/pt Category:BeforePageDisplay extensions/pt Category:CanonicalNamespaces extensions/pt Category:CodeEditorGetPageLanguage extensions/pt Category:ContentHandler extensions/pt Category:Database extensions/pt Category:EditFilterMergedContent extensions/pt Category:Extensions in Wikimedia version control/pt Category:Extensions included in Canasta/pt Category:Extensions included in Miraheze/pt Category:Extensions included in WikiForge/pt Category:Extensions used on Wikimedia/pt Category:Extensions with manual MediaWiki version/pt Category:GPL licensed extensions/pt Category:GetPreferences extensions/pt Category:MovePageIsValidMove extensions/pt Category:Special page extensions/pt Category:Stable extensions/pt Category:Statistics extensions/pt